linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Jan Kara <jack@suse.cz>, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] quota: Convert quota statistics to generic percpu_counter
Date: Tue, 25 May 2010 15:47:00 +0200	[thread overview]
Message-ID: <20100525134700.GA3783@quack.suse.cz> (raw)
In-Reply-To: <87ocg4kyng.fsf@openvz.org>

On Tue 25-05-10 15:29:23, Dmitry Monakhov wrote:
> Generic pcpu counter has some memory overhead but it is negligible for
> modern systems, and embedded systems compiles without quota support.
> And code reuse is always good thing. This patch should fix complain
> from preemptive kernels which was introduced by dde9588853b1bde
...
>  static ctl_table fs_dqstats_table[] = {
>  	{
>  		.procname	= "lookups",
>  		.data		= &dqstats.stat[DQST_LOOKUPS],
> -		.maxlen		= sizeof(int),
> +		.maxlen		= sizeof(s64),
  You use proc_dounlongvec_minmax so .maxlen should be sizeof(unsigned
long)...

> @@ -253,29 +252,12 @@ enum {
>  };
>  
>  struct dqstats {
> -	int stat[_DQST_DQSTAT_LAST];
> +	struct percpu_counter cntp[_DQST_DQSTAT_LAST];
> +	s64 stat[_DQST_DQSTAT_LAST];
        ^^^ And here you should have unsigned long as well. Otherwise
you would see the value as two 32-bit numbers on 32-bit archs.

									Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

  parent reply	other threads:[~2010-05-27 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 11:29 [PATCH] quota: Convert quota statistics to generic percpu_counter Dmitry Monakhov
2010-05-25 11:39 ` Dmitry Monakhov
2010-05-25 13:47 ` Jan Kara [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-27 13:27 Jan Kara
2010-05-27 15:45 ` 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=20100525134700.GA3783@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).