From: Andrew Morton <akpm@zip.com.au>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch 5/18] mark swapout pages PageWriteback()
Date: Sun, 26 May 2002 19:19:20 -0700 [thread overview]
Message-ID: <3CF197A8.A5DB850B@zip.com.au> (raw)
In-Reply-To: <3CF14834.7FF3E72E@zip.com.au> <Pine.LNX.4.44.0205261756410.1400-100000@home.transmeta.com>
Linus Torvalds wrote:
>
> On Sun, 26 May 2002, Andrew Morton wrote:
> >
> > One fix would be to teach shrink_cache() to wait on PG_locked for swap
> > pages. The other approach is to set both PG_locked and PG_writeback
> > for swap pages so they can be handled in the same manner as file-backed
> > pages in shrink_cache().
>
> How about making them do exactly what normal writeout does, namely drop
> the locked bit too. Is there any advantage to holding it any more? The
> difference between swap writeout and normal writeout seems to be fairly
> arbitrary at this point.
>
That leads to block_flushpage() being called under spinlock against a
page which has locked buffers, so it schedules on the buffer lock and
the box deadlocks.
So... can do, but I'll have to sort out the block_flushpage-under-spinlock
problem in the process.
But I recall you saying that there was advantage in keeping swapout pages
locked so that aggressive memory users would throttle against their
own swapout. What's the story there?
Generally, there are a number of irritating swap special-cases popping up
and yes, it would be nice to give swap a proper inode, superblock (maybe)
and a get_block so it can become more regular. One obstacle there is
the PAGE_SIZE versus PAGE_CACHE_SIZE thing. Would have to add a new
address_space.page_size for that, which would penalise other address_spaces
slightly (in terms of memory usage and code size).
I've been trying to not look at the swap code ;) But there will be some
benefit it teaching swap to go direct to BIO to avoid the extra buffer
allocations when things are squeezy. So I do need to stick my nose in
there.
-
next prev parent reply other threads:[~2002-05-27 2:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-26 20:40 [patch 5/18] mark swapout pages PageWriteback() Andrew Morton
2002-05-27 0:57 ` Linus Torvalds
2002-05-27 2:19 ` Andrew Morton [this message]
2002-05-27 3:38 ` Linus Torvalds
2002-05-31 20:58 ` Andrea Arcangeli
2002-05-31 23:02 ` Linus Torvalds
2002-06-01 6:17 ` Hugh Dickins
2002-06-05 11:22 ` Pavel Machek
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=3CF197A8.A5DB850B@zip.com.au \
--to=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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