linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC:PATCH 00/07] VM File Tails
Date: Wed, 29 Aug 2007 21:15:11 -0500	[thread overview]
Message-ID: <1188440111.9221.3.camel@norville.austin.ibm.com> (raw)
In-Reply-To: <20070829233802.GC29635@lazybastard.org>

On Thu, 2007-08-30 at 01:38 +0200, Jorn Engel wrote:
> On Wed, 29 August 2007 21:45:42 +0000, Dave Kleikamp wrote:
> > On Wed, 2007-08-29 at 23:31 +0200, Jorn Engel wrote:
> > > On Wed, 29 August 2007 16:53:25 -0400, Dave Kleikamp wrote:
> > > >
> > > > - benchmark!
> > > 
> > > I'd love to know how much difference this makes.  Basically four
> > > numbers:
> > > - number of address spaces
> > > - bytes allocated for file tails
> > > - number of pages allocated for non-tail storage
> > > - number of pages allocated for tail storage
> > 
> > The last one may be tricky, since I'm allocating the tails using
> > kmalloc.  The data will be interspersed with other kmalloc'ed data.  We
> > could keep track of the bytes, and the number of tails, but we wouldn't
> > know exactly how the tail bytes correspond to the number of pages needed
> > to store them.
> 
> Sorry, I should have been more precise.  Under some circumstances like
> mmap() you have to allocate a page and copy the tail to that page.  My
> last point was about the number of such pages, not the number of pages
> buried in slab caches.
> 
> Iiuc your current implementation would keep the kmalloc()-allocated tail
> in the address space and _additionally_ have a full page for the same
> data.  So the patches aimed to save memory may actually waste memory and
> depending on circumstances may waste more than they save.  Or did I
> misinterpret something?

Once the data is packed into the tail, the page is freed.  Later if the
page is needed, a new page is allocated and the tail is unpacked into
it.  Then the tail is freed (via kfree).
-- 
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:[~2007-08-30  2:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-29 20:53 Dave Kleikamp
2007-08-29 20:53 ` [RFC:PATCH 01/07] Add tail to address space Dave Kleikamp
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 [this message]
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=1188440111.9221.3.camel@norville.austin.ibm.com \
    --to=shaggy@linux.vnet.ibm.com \
    --cc=joern@logfs.org \
    --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