linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@austin.ibm.com>
To: linux-mm <linux-mm@kvack.org>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>,
	Dave McCracken <dmccr@us.ibm.com>,
	Badari Pulavarty <pbadari@us.ibm.com>
Subject: [RFC:PATCH 001/008] Changes to common header files
Date: Mon, 17 Jul 2006 22:08:13 -0600	[thread overview]
Message-ID: <20060718040811.11926.43206.sendpatchset@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <20060718040804.11926.76333.sendpatchset@kleikamp.austin.ibm.com>

Changes to common header files

Add tail to address space and define PG_tail page flag

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
---
diff -Nurp linux000/arch/powerpc/Kconfig linux001/arch/powerpc/Kconfig
--- linux000/arch/powerpc/Kconfig	2006-06-17 20:49:35.000000000 -0500
+++ linux001/arch/powerpc/Kconfig	2006-07-17 23:04:37.000000000 -0500
@@ -696,6 +696,15 @@ config PPC_64K_PAGES
           while on hardware with such support, it will be used to map
           normal application pages.
 
+config FILE_TAILS
+	bool "Store file tails in slab cache"
+	depends on PPC_64K_PAGES
+	help
+	  If the data at the end of a file, or the entire file, is small,
+	  the kernel will attempt to store that data in the slab cache,
+	  rather than allocate an entire page in the page cache.
+	  If unsure, say N here.
+
 config SCHED_SMT
 	bool "SMT (Hyperthreading) scheduler support"
 	depends on PPC64 && SMP
diff -Nurp linux000/include/linux/fs.h linux001/include/linux/fs.h
--- linux000/include/linux/fs.h	2006-06-17 20:49:35.000000000 -0500
+++ linux001/include/linux/fs.h	2006-07-17 23:04:37.000000000 -0500
@@ -398,6 +398,9 @@ struct address_space {
 	spinlock_t		private_lock;	/* for use by the address_space */
 	struct list_head	private_list;	/* ditto */
 	struct address_space	*assoc_mapping;	/* ditto */
+#ifdef CONFIG_FILE_TAILS
+	void			*tail;		/* efficiently stored tail */
+#endif
 } __attribute__((aligned(sizeof(long))));
 	/*
 	 * On most architectures that alignment is already the case; but
diff -Nurp linux000/include/linux/page-flags.h linux001/include/linux/page-flags.h
--- linux000/include/linux/page-flags.h	2006-06-17 20:49:35.000000000 -0500
+++ linux001/include/linux/page-flags.h	2006-07-17 23:04:37.000000000 -0500
@@ -89,6 +89,7 @@
 #define PG_buddy		19	/* Page is free, on buddy lists */
 
 #define PG_uncached		20	/* Page has been mapped as uncached */
+#define PG_tail			21	/* Pseudo-page representing tail */
 
 /*
  * Global page accounting.  One instance per CPU.  Only unsigned longs are
@@ -360,6 +361,10 @@ extern void __mod_page_state_offset(unsi
 #define SetPageUncached(page)	set_bit(PG_uncached, &(page)->flags)
 #define ClearPageUncached(page)	clear_bit(PG_uncached, &(page)->flags)
 
+#define PageTail(page)		test_bit(PG_tail, &(page)->flags)
+#define SetPageTail(page)	set_bit(PG_tail, &(page)->flags)
+#define ClearPageTail(page)	clear_bit(PG_tail, &(page)->flags)
+
 struct page;	/* forward declaration */
 
 int test_clear_page_dirty(struct page *page);

-- 
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>

  reply	other threads:[~2006-07-18  4:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-18  4:08 [RFC:PATCH 000/008] Tail Packing in the the Page Cache Dave Kleikamp
2006-07-18  4:08 ` Dave Kleikamp [this message]
2006-07-18  4:08 ` [RFC:PATCH 002/008] Base file tail function Dave Kleikamp
2006-07-18  4:08 ` [RFC:PATCH 003/008] Handle tail pages in kmap & kmap_atomic Dave Kleikamp
2006-07-18  4:08 ` [RFC:PATCH 004/008] Wrap i_size_write Dave Kleikamp
2006-07-18  4:08 ` [RFC:PATCH 005/008] unpack tail page to avoid memory mapping Dave Kleikamp
2006-07-18  4:08 ` [RFC:PATCH 006/008] Don't need to zero past end-of-file in file tail Dave Kleikamp
2006-07-18  4:09 ` [RFC:PATCH 007/008] Make sure tail page is freed correctly Dave Kleikamp
2006-07-18  4:09 ` [RFC:PATCH 008/008] Handle file tails in mm/filemap.c 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=20060718040811.11926.43206.sendpatchset@kleikamp.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=dmccr@us.ibm.com \
    --cc=linux-mm@kvack.org \
    --cc=pbadari@us.ibm.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