From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] quota: Make quota stat accounting lockless.
Date: Mon, 26 Apr 2010 17:24:08 +0200 [thread overview]
Message-ID: <20100426152407.GE3673@quack.suse.cz> (raw)
In-Reply-To: <20100426151623.GD3673@quack.suse.cz>
On Mon 26-04-10 17:16:23, Jan Kara wrote:
> On Fri 23-04-10 09:31:41, Dmitry Monakhov wrote:
> >
> > I've written this patch long time ago, it is pretty simple, and
> > allow more non obvious locking optimization to be done later.
> The patch looks OK to me. Will merge it.
Hmm, maybe I spoke to soon. One question:
> > +void dqstats_inc(unsigned int type)
> > +{
> > +#ifdef CONFIG_SMP
> > + per_cpu_ptr(dqstats_pcpu, smp_processor_id())->stat[type]++;
> > +#else
> > + dqstats[type]++;
> > +#endif
> > +}
> > +
> > +void dqstats_dec(unsigned int type)
> > +{
> > +#ifdef CONFIG_SMP
> > + per_cpu_ptr(dqstats_pcpu, smp_processor_id())->stat[type]--;
> > +#else
> > + dqstats[type]--;
> > +#endif
> > +}
Why not make these two functions inline? Since they are used
also from quota_tree.c and quota_v1.c, we'd need to move them to a
quota.h header in that case.
Honza
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2010-04-26 15:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 5:31 [PATCH] quota: Make quota stat accounting lockless Dmitry Monakhov
2010-04-26 15:16 ` Jan Kara
2010-04-26 15:24 ` Jan Kara [this message]
2010-04-26 16:14 ` Dmitry Monakhov
2010-04-26 17:37 ` Jan Kara
2010-04-26 20:14 ` Jan Kara
2010-04-27 3:54 ` Dmitry Monakhov
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=20100426152407.GE3673@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmonakhov@openvz.org \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).