* [PATCH] ramdisk/VM fix
@ 2001-03-08 18:25 Philipp Rumpf
0 siblings, 0 replies; only message in thread
From: Philipp Rumpf @ 2001-03-08 18:25 UTC (permalink / raw)
To: linux-kernel, torvalds; +Cc: riel, Alan Cox
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 ...
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2001-03-08 18:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-08 18:25 [PATCH] ramdisk/VM fix Philipp Rumpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).