From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: linux-mm <linux-mm@kvack.org>
Subject: [RFC:PATCH 000/012] VM Page Tails
Date: Thu, 24 May 2007 08:11:30 -0400 [thread overview]
Message-ID: <20070524121130.13533.32563.sendpatchset@kleikamp.austin.ibm.com> (raw)
I wanted to get some feedback on this as it is, before it undergoes some
major re-writing. These patches are against linux-2.6.22-rc2.
These patches implement what I'm calling "VM File Tails" to
differentiate this code from a file system's method of storing file
tails on disk, such as reiserfs does. I've struggled a bit on the
naming of the config option and symbols. I changed the PageTail()
to PageFileTail() to avoid confusion with the tails of a compound page,
and I've changed the config option from CONFIG_FILE_TAILS to
CONFIG_VM_FILE_TAILS to make it clear that this is not really a
filesystem thing.
The object is to store smaller files more effiently on kernels that use
a large base page size. In particular I'm targeting Series P kernels
compiled with CONFIG_64K_PAGES.
Buffers for the tails are kmalloc'ed and aligned to the file system's
block size. A fake page struct is allocated and assigned to the file
tail, and used in the page cache (radix tree), file system code, and
even passed to the device drivers in order to perform I/O.
If a file is grown, or an mmapped tail is touched, the tail is unpacked
into a normal page.
I've tried getting rid of the new page flag PG_filetail, by defining
a function:
static inline int page_is_file_tail(struct page *page) {
return (page->mapping && page == page->mapping->tail_page);
}
where tail_page is a new field in the mapping, but this gets complicated
when the page is removed from the page cache. zeroing page->mapping would
cause us to lose track of the fact that this is not a real page struct.
I believe I can make it work, but the patch gets much more intrusive, so
I've left it as a page flag for the time being.
The current implementation only enables the new code for jfs and ext4 in
order to minimize any possible file system corruption until the code
becomes more stable. The code currently is NOT stable, so review it all
you want, but be warned that it may crash or lockup your machine if you
try to run it.
These patches completely conflict with Nick Piggin's Lockless Page Cache
patches, so keep in mind that all of the locking in mm/page_tail.c is going
to have to be re-worked.
I also think I can build on top of Christoph Lameter's Variable Order Page
Cache patches, which deals with some of the same concepts, but from a
different direction. He's looking at larger than PAGE_SIZE pages, where
I'm looking at pages that are smaller than PAGE_SIZE.
--
David Kleikamp
IBM Linux Technology Center
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next reply other threads:[~2007-05-24 12:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-24 12:11 Dave Kleikamp [this message]
2007-05-24 12:11 ` [RFC:PATCH 001/012] Make iommu_map_sg deal with less-than-page-aligned data Dave Kleikamp
2007-05-24 12:11 ` [RFC:PATCH 002/012] Allow file systems to specify whether to store file tails Dave Kleikamp
2007-05-24 12:11 ` [RFC:PATCH 003/012] Add tail to address space and define PG_pagetail page flag Dave Kleikamp
2007-05-24 12:11 ` [RFC:PATCH 004/012] Replace PAGE_CACHE_SIZE with page_data_size() Dave Kleikamp
2007-05-24 12:11 ` [RFC:PATCH 005/012] Base file tail function Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 006/012] Modify lowmem_page_address() & page_to_phys() to special case tail page Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 007/012] Avoid page_to_pfn() on " Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 008/012] bh_offset needs to take page_address into consideration Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 009/012] Wrap i_size_write Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 010/012] unpack tail page to avoid memory mapping Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 011/012] Make sure tail page is freed correctly Dave Kleikamp
2007-05-24 12:12 ` [RFC:PATCH 012/012] Add tail hooks into file_map.c Dave Kleikamp
2007-05-24 12:45 ` [RFC:PATCH 000/012] VM File Tails Dave Kleikamp
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=20070524121130.13533.32563.sendpatchset@kleikamp.austin.ibm.com \
--to=shaggy@linux.vnet.ibm.com \
--cc=linux-mm@kvack.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