From: Linus Torvalds <torvalds@linux-foundation.org>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Hugh Dickins <hugh@veritas.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Christoph Lameter <clameter@sgi.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
Andrew Morton <akpm@linux-foundation.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jens Axboe <jens.axboe@oracle.com>,
"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 14:15:56 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.00.0804071409150.2886@woody.linux-foundation.org> (raw)
In-Reply-To: <47FA8CB0.6070106@cs.helsinki.fi>
On Tue, 8 Apr 2008, Pekka Enberg wrote:
>
> I wonder if we can get away with a SLAB_IO flag that you can use to annotate
> caches that participate in writeout and the allocator could keep some spare
> pages around that can be handed out for them in case of OOM...
Actually, I don't think this is SLAB-specific, since there are potentially
the same issues for pages.
I suspect the right thing to do is not to mark them for "IO", but mark
them for "short-lived", and allow short-lived allocations that don't have
extended lifetimes to succeed even when a "real" allocation wouldn't.
When we are under memory pressure, a normal allocation generally needs to
clear up enough memory from elsewhere to succeed. But a short-lived
allocation without any long-term lifetimes would be known to release its
memory back to the pool, so it can be allowed to go ahead when a normal
memory allocation would not.
Examples of short-lived allocations:
- IO requests
- temporary network packets that don't get queued up (eg "ACK" packet) as
opposed to those that do get queued (incoming _or_ outgoing queues)
- things like the temporary buffers for "getname()/putname()" etc.
That said, even a lot of temporary allocations can at times have issues.
If your IO layer is dead, your IO request queues that _should_ have been
very temporary may end up staying around for a long time. But I do think
that it makes sense to prioritize allocations that are known to be short-
lived.
(It might also allows us to allocate them from different pools and just
generally have other heuristics for cache behaviour - short-lived
allocations simply have different behaviour)
Linus
next prev parent reply other threads:[~2008-04-07 21:17 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
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 [this message]
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=alpine.LFD.1.00.0804071409150.2886@woody.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--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=hugh@veritas.com \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=penberg@cs.helsinki.fi \
--cc=rjw@sisk.pl \
/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®