public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Alan Cox <alan@redhat.com>
Cc: Oliver Neukum <oliver@neukum.org>,
	Pete Zaitcev <zaitcev@redhat.com>,
	Hugh Dickins <hugh@veritas.com>,
	arjanv@redhat.com, greg@kroah.com, linux-kernel@vger.kernel.org,
	riel@redhat.com, sct@redhat.com
Subject: Re: PF_MEMALLOC in 2.6
Date: Sat, 21 Aug 2004 12:03:34 +1000	[thread overview]
Message-ID: <4126AD76.5060006@yahoo.com.au> (raw)
In-Reply-To: <20040820150257.GC6812@devserv.devel.redhat.com>

Alan Cox wrote:
> On Fri, Aug 20, 2004 at 04:50:07PM +0200, Oliver Neukum wrote:
> 
>>>This is what made me suspect that it's the diry memory writeout problem.
>>>It's just like how it was on 2.4 before Alan added PF_MEMALLOC.
>>
>>If we add PF_MEMALLOC, do we solve the issue or make it only less
>>likely? Isn't there a need to limit users of the reserves in number?
> 
> 
> PF_MEMALLOC won't recurse. You might run out of memory however. The old
> world scsi drivers run in the thread of the I/O so are protected already
> by PF_MEMALLOC in those cases, its the thread nature of the USB driver which
> makes it more fun. Unless 2.6 vm is radically different I think PF_MEMALLOC
> is the right thing to set although it would always eventually be better to
> find out who is guilty of the blocking allocation that recurses.
> 
> Are any of the VM guys considering PF_LOGALLOC so you can trace it down 8)
> 
> 

The problem isn't necessarily a recursing allocation - although that
wouldn't be helping. The main thing is an inversion in the PF_MEMALLOC
reserve logic.

Memory goes below pages_min, thread A is in the allocator, sets
PF_MEMALLOC and tries to clean some pages. The USB thread then can't
allocate memory to service these requests because it is not PF_MEMALLOC.

If you make the USB thread PF_MEMALLOC, you solve this problem at the
cost of making the PF_MEMALLOC reserve more fragile. If you're pretty
sure that it only allocates a small, bounded amount of memory then that
may be a good enough fix for now.

  parent reply	other threads:[~2004-08-21  2:03 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19  6:55 PF_MEMALLOC in 2.6 Pete Zaitcev
2004-08-19  6:59 ` William Lee Irwin III
2004-08-19  8:46 ` Stephen C. Tweedie
2004-08-19  8:59 ` Oliver Neukum
2004-08-19 12:41 ` Hugh Dickins
2004-08-19 18:25   ` Oliver Neukum
2004-08-20  2:37     ` Nick Piggin
2004-08-20  7:56       ` Oliver Neukum
2004-08-20  8:06         ` Nick Piggin
2004-08-20  8:40           ` Pete Zaitcev
2004-08-20 14:50             ` Oliver Neukum
2004-08-20 15:02               ` Alan Cox
2004-08-20 16:04                 ` Rik van Riel
2004-08-20 16:06                   ` Arjan van de Ven
2004-08-20 16:10                     ` Alan Cox
2004-08-20 16:14                       ` Rik van Riel
2004-08-21  2:03                 ` Nick Piggin [this message]
2004-08-20  8:52           ` Oliver Neukum
2004-08-20  9:06             ` Nick Piggin
2004-08-26 21:16             ` Zephaniah E. Hull
2004-08-26 22:04               ` Oliver Neukum
     [not found]                 ` <20040827032554.GB30820@babylon.d2dc.net>
2004-08-27  9:15                   ` Oliver Neukum
2004-08-26 23:41               ` Mikulas Patocka
2004-08-20 10:31   ` Stephen C. Tweedie
2004-08-20 15:34     ` Oliver Neukum

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=4126AD76.5060006@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=alan@redhat.com \
    --cc=arjanv@redhat.com \
    --cc=greg@kroah.com \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=riel@redhat.com \
    --cc=sct@redhat.com \
    --cc=zaitcev@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