lkml.org 
[lkml]   [2012]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: zcache: fix serialization bug in zv stats
On Fri, Dec 30, 2011 at 11:35:45AM -0600, Seth Jennings wrote:
> On 12/30/2011 11:02 AM, Dan Magenheimer wrote:
> >> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
> >> Sent: Friday, December 30, 2011 9:42 AM
> >> To: Greg Kroah-Hartman
> >> Cc: Seth Jennings; Dan Magenheimer; Brian King; devel@driverdev.osuosl.org; linux-
> >> kernel@vger.kernel.org
> >> Subject: [PATCH] staging: zcache: fix serialization bug in zv stats
> >>
> >> In a multithreaded workload, the zv_curr_dist_counts
> >> and zv_cumul_dist_counts statistics are being corrupted
> >> because the increments and decrements in zv_create
> >> and zv_free are not atomic.
> >>
> >> This patch converts these statistics and their corresponding
> >> increments/decrements/reads to atomic operations.
> >>
> >> Based on v3.2-rc7
> >>
> >> Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
> >
> > I'm inclined to nack this change, at least unless inside an #ifdef DEBUG,
>
> I guess I didn't respond to this suggestion. We could put #ifdef DEBUG
> around the updates in zv_create and zv_free and around the two sysfs
> *_show functions. Kinda messy though. I guess it might not matter
> if we'll be re-evaluating this whole thing soon.

Perhaps also add in the TODO file that we want to move the stats collection
out of the code and only be enabled if CONFIG_DEBUGFS is set? (Which granted means
we need to implement the stats output in debugfs instead of sysfs).


\
 
 \ /
  Last update: 2012-01-03 22:43    [W:0.063 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site