mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Hans Reiser <reiser@namesys.com>
Cc: linux-kernel@vger.kernel.org, Reiserfs-List@namesys.com,
	green@linuxhacker.ru
Subject: Re: [Fwd: Re: [PATCH] reiserfs: use balance_dirty_pages_ratelimited_nr in reiserfs_file_write]
Date: Thu, 2 Mar 2006 15:08:59 -0800	[thread overview]
Message-ID: <20060302150859.51ffb93f.akpm@osdl.org> (raw)
In-Reply-To: <4407386D.4070008@namesys.com>

Hans Reiser <reiser@namesys.com> wrote:
>
> I suspect that when someone did the search and replace when creating
> balance_dirty_pages_ratelimited_nr they failed to read the code and
> realize this code path was already effectively ratelimited.  The result
> is they made it excessively infrequent (every 1MB if ratelimit is 8) in
> its calling balance_dirty_pages.

??  There's been no change to balance_dirty_pages_ratelimited().  I merely
widened the interface a bit: introduced the new
balance_dirty_pages_ratelimited_nr() and did

static inline void
balance_dirty_pages_ratelimited(struct address_space *mapping)
{
	balance_dirty_pages_ratelimited_nr(mapping, 1);
}

That being said, if reiserfs has `number of pages' in hand then yes, it
makes sense to migrate over to balance_dirty_pages_ratelimited_nr().

> If anyone has ever seen this as an actual problem on a real system, I
> would be curious to hear of it.

No, I wouldn't expect it to make much difference.

All that gunk is there just to avoid calling the expensive
get_writeback_state() once per set_page_dirty().

Inaccuracy here will introduce the possibility that we'll transiently dirty
more memory than dirty_ratio permits, but it'll only be a little bit (eight
times the amount of memory which is dirtied per balance_dirty_pages_ratelimited()
call).

That's a small amount of memory.  But if you have 1000 filesystems mounted
and they all do the same thing at the same time, things could get a bit
sticky.  Your patch will (greatly) reduce the possibility of even that
scenario.


  reply	other threads:[~2006-03-02 23:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02 18:24 Hans Reiser
2006-03-02 23:08 ` Andrew Morton [this message]
2006-03-03 17:24   ` Hans Reiser

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=20060302150859.51ffb93f.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=Reiserfs-List@namesys.com \
    --cc=green@linuxhacker.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiser@namesys.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

Powered by JetHome