From: Philipp Rumpf <prumpf@mandrakesoft.com>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Cc: riel@conectiva.com.br, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: [PATCH] ramdisk/VM fix
Date: Thu, 8 Mar 2001 12:25:36 -0600 [thread overview]
Message-ID: <20010308122536.F4306@mandrakesoft.mandrakesoft.com> (raw)
With the current rd.c code, we can get into a situation where there is
a buffer-only page for data which is also in a page cache page with
page->buffers != NULL. The current vmscan.c code never frees the page
cache page in this scenario, effectively doubling ramdisk memory
requirements.
Linus, I think this is a bugfix (tested against -ac kernels):
diff -ur linux/include/linux/swap.h linux-prumpf/include/linux/swap.h
--- linux/include/linux/swap.h Thu Mar 8 10:01:30 2001
+++ linux-prumpf/include/linux/swap.h Thu Mar 8 10:14:12 2001
@@ -284,7 +284,7 @@
#endif
#define page_ramdisk(page) \
- (page->buffers && (MAJOR(page->buffers->b_dev) == RAMDISK_MAJOR))
+ (page->buffers && (MAJOR(page->buffers->b_dev) == RAMDISK_MAJOR) && buffer_protected(page->buffers))
extern spinlock_t swaplock;
I don't think I'm missing anything important ...
reply other threads:[~2001-03-08 18:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010308122536.F4306@mandrakesoft.mandrakesoft.com \
--to=prumpf@mandrakesoft.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--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
all inboxes | Powered by JetHome®