linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: linux-mm <linux-mm@kvack.org>
Subject: [RFC:PATCH 01/07] Add tail to address space
Date: Wed, 29 Aug 2007 16:53:31 -0400	[thread overview]
Message-ID: <20070829205331.28328.59704.sendpatchset@norville.austin.ibm.com> (raw)
In-Reply-To: <20070829205325.28328.67953.sendpatchset@norville.austin.ibm.com>

Add tail to address space

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>

---

 fs/inode.c         |    3 +++
 include/linux/fs.h |    4 ++++
 mm/Kconfig         |    9 +++++++++
 3 files changed, 16 insertions(+)

diff -Nurp linux000/fs/inode.c linux001/fs/inode.c
--- linux000/fs/inode.c	2007-08-28 09:57:14.000000000 -0500
+++ linux001/fs/inode.c	2007-08-29 13:27:46.000000000 -0500
@@ -197,6 +197,9 @@ void inode_init_once(struct inode *inode
 	spin_lock_init(&inode->i_data.i_mmap_lock);
 	INIT_LIST_HEAD(&inode->i_data.private_list);
 	spin_lock_init(&inode->i_data.private_lock);
+#ifdef CONFIG_VM_FILE_TAILS
+	spin_lock_init(&inode->i_data.tail_lock);
+#endif
 	INIT_RAW_PRIO_TREE_ROOT(&inode->i_data.i_mmap);
 	INIT_LIST_HEAD(&inode->i_data.i_mmap_nonlinear);
 	spin_lock_init(&inode->i_lock);
diff -Nurp linux000/include/linux/fs.h linux001/include/linux/fs.h
--- linux000/include/linux/fs.h	2007-08-28 09:57:17.000000000 -0500
+++ linux001/include/linux/fs.h	2007-08-29 13:27:46.000000000 -0500
@@ -453,6 +453,10 @@ 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_VM_FILE_TAILS
+	void			*tail;		/* file tail */
+	spinlock_t		tail_lock;	/* protect tail */
+#endif
 } __attribute__((aligned(sizeof(long))));
 	/*
 	 * On most architectures that alignment is already the case; but
diff -Nurp linux000/mm/Kconfig linux001/mm/Kconfig
--- linux000/mm/Kconfig	2007-08-28 09:57:20.000000000 -0500
+++ linux001/mm/Kconfig	2007-08-29 13:27:46.000000000 -0500
@@ -176,3 +176,12 @@ config NR_QUICK
 config VIRT_TO_BUS
 	def_bool y
 	depends on !ARCH_NO_VIRT_TO_BUS
+
+config VM_FILE_TAILS
+	bool "Store file tails in slab cache"
+	def_bool n
+	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.

--
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:[~2007-08-29 20:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 20:53 [RFC:PATCH 00/07] VM File Tails Dave Kleikamp
2007-08-29 20:53 ` Dave Kleikamp [this message]
2007-08-29 20:53 ` [RFC:PATCH 02/07] Core function for packing, unpacking, and freeing file tails Dave Kleikamp
2007-08-29 20:53 ` [RFC:PATCH 03/07] Release tail when inode is freed Dave Kleikamp
2007-08-29 20:53 ` [RFC:PATCH 04/07] Unpack or remove file tail when inode is resized Dave Kleikamp
2007-08-29 20:53 ` [RFC:PATCH 05/07] find_get_page() and find_lock_page() need to unpack the tail Dave Kleikamp
2007-08-29 20:54 ` [RFC:PATCH 06/07] For readahead, leave data in tail Dave Kleikamp
2007-08-29 20:54 ` [RFC:PATCH 07/07] shrink_active_list: pack file tails rather than move to inactive list Dave Kleikamp
2007-08-29 21:31 ` [RFC:PATCH 00/07] VM File Tails Jörn Engel
2007-08-29 21:45   ` Dave Kleikamp
2007-08-29 23:38     ` Jörn Engel
2007-08-30  2:15       ` Dave Kleikamp
2007-08-30 10:11         ` Jörn Engel
2007-08-31 21:00 ` Luiz Fernando N. Capitulino
2007-08-31 21:47   ` Dave Kleikamp
2007-09-03 21:09     ` Luiz Fernando N. Capitulino

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=20070829205331.28328.59704.sendpatchset@norville.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