mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter W. Morreale" <pmorreale@novell.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] pdflush fix and enhancement
Date: Tue, 30 Dec 2008 18:56:29 -0700	[thread overview]
Message-ID: <1230688589.3470.45.camel@hermosa.site> (raw)
In-Reply-To: <87fxk5ur0h.fsf@basil.nowhere.org>

On Wed, 2008-12-31 at 01:28 +0100, Andi Kleen wrote:
> Peter W Morreale <pmorreale@novell.com> writes:
> 
> > The following series implements a fix for pdflush thread creation and an
> > enhancement for allowing the setting of the minimum and maximun number
> > of pdflush threads. 
> 
> You forgot to state why the admin should control that?
> 
> Each sysctl essentially presents a failure of the automatic tuning
> algorithms of the kernel (kernel hackers admitting defeat). 
> 
> So a patch adding new ones at least needs a clear rationale what
> problem it is trying to fix and why the automatic tuning cannot be
> fixed instead to address this case without new knobs.
> 

Understood.  

The rational is simply because one-size may not fit all.  Currently
there is minimalistic tuning wrt pdflush thread creation. 

Each pdflush thread arbitrarily decides to create another thread solely
on the basis of all currently existing threads being busy for >= one
second.  So this can result in NCPUS pdflush threads being created
'concurrently' should all existing threads wind up in the idle check at
the same time (I have seen this).  Or it can result in a thread being
created every second, up to the max.  That seems indeterministic at
best. 

Note that this patch doesn't change that algorithm at all, it merely
allows the admin to control the bounds without having to recompile the
kernel. 

More to the point, on small systems with few file systems, what is the
point of having 8 (the current max) threads competing with each other on
a single disk?  Likewise, on a 64-way, or larger system with dozens of
filesystems/disks, why wouldn't I want more background flushing?

I actually think the question is: Why not allow the admin to control
this?  Since it seems like this is a matter of policy based on machine
configuration.  I don't look at this as a matter of defeat, rather, a
matter of policy. Note that the current defaults remain the same.

So that's the rational.  Its not an attempt to fix background flushing,
and regardless, I would still argue that any 'fix' to background
flushing would involve a number of threads that were bounded by some
min/max  and that min/max would still need to be set on some admin
policy based on intended machine size/use. 

And btw Andi, I should have cc'ed you on this, I know from the flush
code that you were heavily involved.  I only cc'ed Peter Z. since his
name was in pdflush.c.  My apologies.  

Best,
-PWM



> -Andi
> 


  reply	other threads:[~2008-12-31  1:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30 23:12 Peter W Morreale
2008-12-30 23:12 ` [PATCH 1/2] Fix pdflush thread creation upper bound Peter W Morreale
2008-12-30 23:12 ` [PATCH 2/2] Add /proc controls for pdflush threads Peter W Morreale
2008-12-30 23:59   ` Randy Dunlap
2008-12-31  0:15     ` Peter W. Morreale
2008-12-31  2:38     ` Peter W. Morreale
2008-12-31  3:30       ` Randy Dunlap
2008-12-31  8:01   ` Andrew Morton
2008-12-31 14:54     ` Peter W. Morreale
2008-12-31  0:28 ` [PATCH 0/2] pdflush fix and enhancement Andi Kleen
2008-12-31  1:56   ` Peter W. Morreale [this message]
2008-12-31  2:46     ` Andi Kleen
2008-12-31  4:11       ` Peter W. Morreale
2008-12-31  7:08         ` Dave Chinner
2008-12-31 15:40           ` Peter W. Morreale
2009-01-01 23:27             ` Dave Chinner
2009-01-02  2:07               ` Peter W. Morreale
2008-12-31 13:27         ` Andi Kleen
2008-12-31 16:08           ` Peter W. Morreale
2009-01-01  1:48             ` Andi Kleen
2008-12-31 11:40       ` Martin Knoblauch

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=1230688589.3470.45.camel@hermosa.site \
    --to=pmorreale@novell.com \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®