mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter W. Morreale" <pmorreale@novell.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, riel@redhat.com
Subject: Re: + mm-add-proc-controls-for-pdflush-threads.patch added to -mm tree
Date: Mon, 05 Jan 2009 23:37:38 +0000	[thread overview]
Message-ID: <1231198658.3470.357.camel@hermosa.site> (raw)
In-Reply-To: <20090105232119.GA3860@x200.localdomain>

On Tue, 2009-01-06 at 02:21 +0300, Alexey Dobriyan wrote:
> On Mon, Jan 05, 2009 at 02:53:03PM -0800, akpm@linux-foundation.org wrote:
> > Subject: mm: add /proc controls for pdflush threads
> 
> > @@ -1022,6 +1023,28 @@ static struct ctl_table vm_table[] = {
> >  		.proc_handler	= &proc_dointvec,
> >  	},
> >  	{
> > +		.ctl_name	= CTL_UNNUMBERED,
> > +		.procname	= "nr_pdflush_threads_min",
> > +		.data		= &nr_pdflush_threads_min,
> > +		.maxlen		= sizeof nr_pdflush_threads_min,
> > +		.mode		= 0644 /* read-write */,
> > +		.proc_handler	= &proc_dointvec_minmax,
> > +		.strategy	= &sysctl_intvec,
> 
> .strategy isn't needed for /proc-only sysctls.
> 

It is for checking the bounds of the new setting.  Without it would be
possible to set the max thread count higher than the minimum and vice
versa.  What you would actually wind up with would depend upon the
number of outstanding threads at the time of the sysctl change. 

The specific limitations are that you cannot set max < min and min >
max.  In addition, since the only way to get another pdflush thread is
via a pdflush thread, the minimum 'min' is 1.  And the 'max' is an
arbitrary 1000. 

Best,
-PWM



> > +		.extra1		= &one,
> > +		.extra2		= &nr_pdflush_threads_max,
> > +	},
> > +	{
> > +		.ctl_name	= CTL_UNNUMBERED,
> > +		.procname	= "nr_pdflush_threads_max",
> > +		.data		= &nr_pdflush_threads_max,
> > +		.maxlen		= sizeof nr_pdflush_threads_max,
> > +		.mode		= 0644 /* read-write */,
> > +		.proc_handler	= &proc_dointvec_minmax,
> > +		.strategy	= &sysctl_intvec,
> 
> .strategy isn't needed for /proc-only sysctls.


      reply	other threads:[~2009-01-05 23:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200901052253.n05Mr3au014416@imap1.linux-foundation.org>
2009-01-05 23:21 ` Alexey Dobriyan
2009-01-05 23:37   ` Peter W. Morreale [this message]

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=1231198658.3470.357.camel@hermosa.site \
    --to=pmorreale@novell.com \
    --cc=adobriyan@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@redhat.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®