All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>, dm-devel@redhat.com
Subject: Re: New dm-bufio with shrinker API
Date: Wed, 7 Sep 2011 10:46:43 +0100	[thread overview]
Message-ID: <20110907094642.GA3729@ubuntu> (raw)
In-Reply-To: <Pine.LNX.4.64.1109061202280.21793@hs20-bc2-1.build.redhat.com>

On Tue, Sep 06, 2011 at 12:08:51PM -0400, Mikulas Patocka wrote:
> So, I can implement a call "void dm_bufio_discard_buffer(struct 
> dm_bufio_client *c, sector_t block)" and this call will discard a specific 
> buffer at a specific location (the call is not guaranteed to succeed, it 
> would not discard if someone is holding the buffer or so). It would be 
> like a "bforget" function for filesystem buffers.
> 
> You will call this function on metadata sectors that you are freeing.
> 
> Do you agree with this interface?

That's not really what I was after, but it's a good idea.  Don't do
anything about it now, and I'll instrument to see if I can drive it
effectively.  I try and recycle freed blocks as quickly as possible to
avoid fragmenting free space, which may mean there is little benefit.

> Other than this, I don't know how to reduce cache size, I don't know about 
> any algorithm that would guess cache size automatically. In operating 
> systems, caches usually grow without limit regardless of whether someone 
> needs the cache or not.

ok, let's go with things as they are.  Thx for your hard work.

One other optimisation to think about: As you know, if a non-blocking
lookup of the thinp mapping fails, the bio gets handed across to a
worker thread to do the blocking lookup.  Is there any way to you
could make dm_bm_read_try_lock() pass a preload hint to bufio, since
we know that block is going to be required in the near future?

- Joe

  reply	other threads:[~2011-09-07  9:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-02 21:34 New dm-bufio with shrinker API Mikulas Patocka
2011-09-05  9:04 ` Joe Thornber
2011-09-05 14:49   ` Joe Thornber
2011-09-05 15:07     ` Christoph Hellwig
2011-09-06  8:50       ` Joe Thornber
2011-09-06  9:53       ` Joe Thornber
2011-09-06 15:57       ` Mikulas Patocka
2011-09-06 16:08         ` Christoph Hellwig
2011-09-07 18:47           ` Mikulas Patocka
2011-09-05 16:01     ` Mikulas Patocka
2011-09-06  9:33       ` Joe Thornber
2011-09-06 16:08         ` Mikulas Patocka
2011-09-07  9:46           ` Joe Thornber [this message]
2011-09-07 18:39             ` Mikulas Patocka

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=20110907094642.GA3729@ubuntu \
    --to=thornber@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=mpatocka@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.