mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Paul Jackson <pj@sgi.com>
Cc: David Chinner <dgc@sgi.com>,
	akpm@osdl.org, Simon.Derr@bull.net, linux-kernel@vger.kernel.org,
	nickpiggin@yahoo.com.au, clameter@sgi.com
Subject: Re: [PATCH 01/03] Cpuset: might sleep checking zones allowed fix
Date: Fri, 19 May 2006 18:54:11 +1000	[thread overview]
Message-ID: <20060519085411.GU1390195@melbourne.sgi.com> (raw)
In-Reply-To: <20060518201207.87b6a244.pj@sgi.com>

On Thu, May 18, 2006 at 08:12:07PM -0700, Paul Jackson wrote:
> David wrote:
> > Basically, Case B falls back to case A when the cpuset is
> > full. So my question really is whether we need to attempt
> > to allocaate within the cpuset for GFP_ATOMIC because
> > most of the time the local node will be within the cpuset
> > anyway....
> > 
> > So that's what lead to me asking this - is there really a
> > noticable distinction between A and B, or is it just
> > cluttering up the code with needless complex logic?
> 
> Perhaps I'm missing something, but that's what I thought you were
> realized tVhat I thought I already recognized and responded to your
> question, with an answer sympathetic to your concerns, and a possible
> patch to address them.

Perhaps we both are :/

email:
	a communication medium where two people can agree
	with each other but be unaware of this fact.

;)

FWIW, I don't play with cpusets much; I mostly come across them when
a cpuset goes OOM and the I/O subsystem hangs somewhere in a
filesystem, block or driver layer and they are typically due to
problems with GFP_ATOMIC allocations. So my POV is probably
different to yours.

> David wrote:
> > Why not simply check this is __cpuset_zone_allowed() and return
> > true? We shouldn't put the burden of getting this right on the
> > callers when it is something internal to the cpuset workings....
> 
> The callers are already conscious of whether or not they can wait.
> For all of the callers of cpuset_zone_allowed() except __alloc_pages,
> they can very well wait, and such a check is noise.

5 of the 6 other callers use __GFP_HARDWALL so won't ever sleep.
Given that 4 of the 5 are in memory reclaim paths, that's probably
a good thing. To an outsider, this appears like __GFP_HARDWALL is
being used to ensure we don't sleep (i.e. GFP_ATOMIC semantics),
and this is one of the angles my reasoning comes from.

> In some programming contexts, I add redundancy for robustness, and
> in some contexts I minimize redundancy for lean and mean code.  The
> kernel tends to be the latter, especially on important code paths.  In

I often wish for better robustness while deep in the guts of
a crash dump from a machine that's gone OOM and hung.

Cheers,

Dave.
-- 
Dave Chinner
R&D Software Enginner
SGI Australian Software Group

  reply	other threads:[~2006-05-19  8:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-18  4:35 Paul Jackson
2006-05-18  4:36 ` [PATCH 02/03] Cpuset: update cpuset_zones_allowed comment Paul Jackson
2006-05-18  4:36 ` [PATCH 03/03] Cpuset: might_sleep_if check in cpuset_zones_allowed Paul Jackson
2006-05-18  5:25 ` [PATCH 01/03] Cpuset: might sleep checking zones allowed fix Andrew Morton
2006-05-18  5:47   ` David Chinner
2006-05-19  0:48     ` Paul Jackson
2006-05-19  2:21       ` David Chinner
2006-05-19  3:12         ` Paul Jackson
2006-05-19  8:54           ` David Chinner [this message]
2006-05-19  0:58   ` Paul Jackson
2006-05-19  1:10     ` Christoph Lameter
2006-05-19  1:26       ` Paul Jackson

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=20060519085411.GU1390195@melbourne.sgi.com \
    --to=dgc@sgi.com \
    --cc=Simon.Derr@bull.net \
    --cc=akpm@osdl.org \
    --cc=clameter@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=pj@sgi.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®