From 2fb445babdd621b71676e40804fe98e95fc9084d Mon Sep 17 00:00:00 2001 From: Xavi Hernandez Date: Thu, 31 Jan 2019 08:13:58 +0100 Subject: syncop: remove unnecessary call to gf_backtrace_save() A call to gf_backtrace_save() was done on each context switch of a synctask. The backtrace is generated writing to the filesystem, so it can have an important impact on latency. The generated backtrace was not used anywhere, so it's been removed. Change-Id: I399a93b932c5b6e981c696c72c3e1ef44710ba52 Updates: bz#1193929 Signed-off-by: Xavi Hernandez --- libglusterfs/src/glusterfs/syncop.h | 1 - libglusterfs/src/syncop.c | 1 - 2 files changed, 2 deletions(-) diff --git a/libglusterfs/src/glusterfs/syncop.h b/libglusterfs/src/glusterfs/syncop.h index 7a6167b0488..e0f10175cea 100644 --- a/libglusterfs/src/glusterfs/syncop.h +++ b/libglusterfs/src/glusterfs/syncop.h @@ -73,7 +73,6 @@ struct synctask { int done; struct list_head waitq; /* can wait only "once" at a time */ - char btbuf[GF_BACKTRACE_LEN]; }; struct syncproc { diff --git a/libglusterfs/src/syncop.c b/libglusterfs/src/syncop.c index bf70daf95c3..6206d4cec7c 100644 --- a/libglusterfs/src/syncop.c +++ b/libglusterfs/src/syncop.c @@ -327,7 +327,6 @@ synctask_yield(struct synctask *task) if (task->state != SYNCTASK_DONE) { task->state = SYNCTASK_SUSPEND; - (void)gf_backtrace_save(task->btbuf); } if (swapcontext(&task->ctx, &task->proc->sched) < 0) { gf_msg("syncop", GF_LOG_ERROR, errno, LG_MSG_SWAPCONTEXT_FAILED, -- cgit