[Bugs] [Bug 1434274] BZ for some bugs found while going through synctask code
bugzilla at redhat.com
bugzilla at redhat.com
Tue Mar 28 22:34:51 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1434274
--- Comment #15 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/16931 committed in master by Pranith Kumar
Karampuri (pkarampu at redhat.com)
------
commit 0f98f5c8070904810252c6fc1df23747afa4b1d7
Author: Ravishankar N <ravishankar at redhat.com>
Date: Tue Mar 21 11:02:32 2017 +0530
syncop: don't wake task in synctask_wake unless really needed
Problem:
In EC and AFR, we launch synctasks during self-heal.
(i) These tasks usually stackwind a FOP to all its children and call
synctask_yield() which does a swapcontext to synctask_switchto() and puts
the
task in syncenv's waitq by calling __wait(task). This happends as long as
the
FOP ckbs from all children haven't been received.
(ii) For each FOP cbk, we call synctask_wake() which again does a
swapcontext
to synctask_switchto() which now puts the task in syncenv's runq by calling
__run(task). When the task runs and the conext switches back to the FOP
path,
it puts the task in waitq because we haven't heard from all children as
explained in (i).
Thus we are unnecessarily using the swapcontext syscalls to just toggle
the task back and forth between the waitq and runq.
Fix:
Store the stackwind count in new variable 'syncbarrier->waitfor' before
winding the fop. In each cbk when we call synctask_wake(), perform an
actual
wake only if the cbk count == stackwind count.
Change-Id: Id62d3b6ffed5a8c50f8b79267fb34e9470ba5ed5
BUG: 1434274
Signed-off-by: Ravishankar N <ravishankar at redhat.com>
Signed-off-by: Ashish Pandey <aspandey at redhat.com>
Reviewed-on: https://review.gluster.org/16931
Smoke: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: Niels de Vos <ndevos at redhat.com>
NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=4k8CkqdhUa&a=cc_unsubscribe
More information about the Bugs
mailing list