From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
Brian King <brking@linux.vnet.ibm.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Konrad Wilk <konrad.wilk@oracle.com>,
Nitin Gupta <ngupta@vflare.org>
Subject: RE: [PATCH] staging: zcache: fix serialization bug in zv stats
Date: Fri, 30 Dec 2011 09:31:17 -0800 (PST) [thread overview]
Message-ID: <0c787a22-68ed-49d9-816b-c9a9c1821772@default> (raw)
In-Reply-To: <4EFDF470.9050104@linux.vnet.ibm.com>
> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
> Subject: Re: [PATCH] staging: zcache: fix serialization bug in zv stats
>
> 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,
> > as these counts are interesting to a developer but not useful to a normal
> > end user, whereas the incremental cost for atomic_inc and atomic_dec are
> > non-trivial. I don't think any off-by-one in these counters could
> > result in a bug and, before promotion from staging, they probably
> > should just go away. (They are fun to "watch -d" though ;-)
>
> In my test, it hammers on particular chunk size and the counter is off
> by hundreds :-/
>
> I too was worried about performance impact, however, my tests showed
> no degradation. That's probably because there are bigger bottlenecks
> elsewhere.
>
> Perhaps we can commit this for now, so that the code is correct, and
> revisit this when we try to replace zbud with zsmalloc. I'm sure
> we'll have to rethink the statistics at that time.
>
> The only other option, IMO, is the remove the chunk stats altogether
> until we can find a solution that is both fast and correct.
>
> I think that continuing with incorrect stats, regardless of the degree
> to which they are incorrect, isn't really a viable option.
OK, well I guess as long as this is addressed before promotion
from staging, and until then the heaviest users will be developers
so I agree you are correct that accurate stats are a good thing.
So, consider my nack resolved and:
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
next prev parent reply other threads:[~2011-12-30 17:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<1325263335-16254-1-git-send-email-sjenning@linux.vnet.ibm.com>
2011-12-30 17:02 ` Dan Magenheimer
2011-12-30 17:27 ` Seth Jennings
2011-12-30 17:31 ` Dan Magenheimer [this message]
2011-12-30 17:35 ` Seth Jennings
2012-01-03 21:38 ` Konrad Rzeszutek Wilk
2011-12-30 16:42 Seth Jennings
2012-02-06 21:18 ` Seth Jennings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0c787a22-68ed-49d9-816b-c9a9c1821772@default \
--to=dan.magenheimer@oracle.com \
--cc=brking@linux.vnet.ibm.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=sjenning@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®