From: Hugh Dickins <hugh@veritas.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Christoph Lameter <clameter@sgi.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jens Axboe <jens.axboe@oracle.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: fix sense_slab/bio swapping livelock
Date: Mon, 7 Apr 2008 21:31:54 +0100 (BST) [thread overview]
Message-ID: <Pine.LNX.4.64.0804072121320.28744@blonde.site> (raw)
In-Reply-To: <1207598115.29991.23.camel@lappy>
On Mon, 7 Apr 2008, Peter Zijlstra wrote:
> On Mon, 2008-04-07 at 20:40 +0100, Hugh Dickins wrote:
> >
> > My supposition is that once a page has been allocated from __GFP_HIGH
> > reserves to a scsi sense_slab, swap_writepages are liable to gobble up
> > the rest of the page with bio allocations which they wouldn't have had
> > access to traditionally (i.e. under SLAB).
> >
> > So an unexpected behaviour emerges from SLUB's slab merging.
>
> Somewhere along the line of my swap over network patches I made
> 'robustified' SLAB to ensure these sorts of things could not happen - it
> came at a cost though.
>
> It would basically fail[*] allocations that had a higher low watermark
> than what was used to allocate the current slab.
>
> [*] - well, it would attempt to allocate a new slab to raise the current
> watermark, but failing that it would fail the allocation.
Thanks, Peter: that sounds just right to me; but a larger change than
we'd want to jump into for this one particular issue - it might have
its own unexpected consequences.
> > If we had a SLAB_NOMERGE flag, would we want to apply it to the
> > bio cache or to the scsi_sense_cache or to both? My difficulty
> > in answering that makes me wonder whether such a flag is right.
>
> If this is critical to avoid memory deadlocks, I would suggest using
> mempools (or my reserve framework).
No, the critical part of it has been dealt with (small fix to scsi
free_list handling: which resembles a mempool, but done its own way).
What remains is about "unsightly" behaviour, the system having a
tendency to collapse briefly into far-from-efficient operation
when out of memory.
Hugh
next prev parent reply other threads:[~2008-04-07 20:28 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-06 22:56 Hugh Dickins
2008-04-06 23:35 ` James Bottomley
2008-04-07 1:01 ` Hugh Dickins
2008-04-07 17:51 ` Hugh Dickins
2008-04-07 18:04 ` James Bottomley
2008-04-07 18:26 ` Hugh Dickins
2008-04-07 2:48 ` FUJITA Tomonori
2008-04-07 18:07 ` Hugh Dickins
2008-04-08 14:04 ` FUJITA Tomonori
2008-04-07 5:26 ` Christoph Lameter
2008-04-07 19:40 ` Hugh Dickins
2008-04-07 19:55 ` Peter Zijlstra
2008-04-07 20:31 ` Hugh Dickins [this message]
2008-04-07 20:47 ` Peter Zijlstra
2008-04-07 21:00 ` Pekka Enberg
2008-04-07 21:05 ` Pekka Enberg
2008-04-07 21:15 ` Linus Torvalds
2008-04-07 21:34 ` Pekka Enberg
2008-04-07 21:39 ` Pekka Enberg
2008-04-07 22:05 ` Pekka J Enberg
2008-04-07 22:17 ` Linus Torvalds
2008-04-07 22:42 ` Pekka Enberg
2008-04-08 20:42 ` Pekka J Enberg
2008-04-08 20:44 ` Pekka Enberg
2008-04-08 20:45 ` Christoph Lameter
2008-04-08 21:11 ` Pekka Enberg
2008-04-08 21:40 ` Peter Zijlstra
2008-04-07 21:30 ` Hugh Dickins
2008-04-07 21:36 ` Pekka Enberg
2008-04-08 20:43 ` Christoph Lameter
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=Pine.LNX.4.64.0804072121320.28744@blonde.site \
--to=hugh@veritas.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rjw@sisk.pl \
--cc=torvalds@linux-foundation.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®