From: Nikita Danilov <nikita@clusterfs.com>
To: "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>
Cc: "Bret Towe" <magnade@gmail.com>,
"Linux Kernel Mailing List" <Linux-Kernel@vger.kernel.org>
Subject: Re: [PATCH] mm: moving dirty pages balancing to pdfludh entirely
Date: Thu, 6 Jul 2006 21:37:18 +0400 [thread overview]
Message-ID: <17581.19022.234542.958272@gargle.gargle.HOWL> (raw)
In-Reply-To: <B41635854730A14CA71C92B36EC22AAC06D26C@mssmsx411>
Ananiev, Leonid I writes:
> Nikita Danilov writes:
> >> by introducing MAX_PDFLUSH_THREADS=8. Why just 8?
> > Sorry, I don't understand. pdflush.c appeared in 2.5.8 and
> Thanks for explanation. Why just 8? Answer: it was introduced in 2.5.8.
No, no, I was commenting on your (incorrect) statement that kernel "was
patched up by introducing MAX_PDFLUSH_THREADS=8". It never was: this
limit is part of the original design, not some "patch".
> Why the constant MAX_PDFLUSH_THREADS is needed? Is it because current
> kernel may create huge number of pdflush threads and overload the
> system? Why we can not set MAX_PDFLUSH_THREADS=512? 1000?
Because this is not needed for current pdflush usage patterns. pdflush
is used for light background write-out, and small number of pdflush
threads is able to achieve necessary IO concurrency level, because they
are mostly non-blocking, thanks to the current_is_pdflush() checks. If
asynchronous write-out cannot cope with the rate of dirtying,
synchronous write-out starts.
You, on the other hand, are trying to use pdflush for the goal it wasn't
designed for. No wonder it doesn't work.
>
> >> Why 48?
> > This is explained in comment just above sync_writeback_pages()
> > definition. Basically, ratelimit_pages pages might be dirtied between
> > calls to balance_dirty_pages(), and the latter tries to write out
> *more*
> > pages to keep number of dirty pages under control: negative feedback
> > control loop, of sorts.
>
> I had asked "why 48?" is hard coded for any configuration. I do not see
> "48" in your explanation.
You didn't look carefully enough. :-)
/*
* When balance_dirty_pages decides that the caller needs to perform some
* non-background writeback, this is how many pages it will attempt to write.
* It should be somewhat larger than RATELIMIT_PAGES to ensure that reasonably
* large amounts of I/O are submitted.
*/
static inline long sync_writeback_pages(void)
{
return ratelimit_pages + ratelimit_pages / 2;
}
ratelimit_pages = 32, hence, sync_writeback_pages() returns 48. It could
be different, of course, if ratelimit_pages were.
>
> You do not recommend to use hard coded constants but
> MAX_PDFLUSH_THREADS=8 and write_chunk=48 are sacred according you mind.
No, I think the fewer hard-coded constants are here---the better. I'd
happily eliminate MAX_PDFLUSH_THREADS, but just dropping this constraint
is a non-solution in search of a problem, obviously.
But this discussion is degenerating, so I shall participate in it no
longer.
>
> Leonid
Nikita.
next prev parent reply other threads:[~2006-07-06 17:42 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 16:33 Ananiev, Leonid I
2006-07-06 17:37 ` Nikita Danilov [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-06 21:07 Ananiev, Leonid I
2006-07-06 13:54 Ananiev, Leonid I
2006-07-06 15:16 ` Nikita Danilov
2006-07-06 11:47 Ananiev, Leonid I
2006-07-06 4:30 Ananiev, Leonid I
2006-07-06 6:34 ` Nikita Danilov
2006-07-05 19:50 Ananiev, Leonid I
2006-07-05 20:05 ` Nikita Danilov
2006-07-05 19:28 Ananiev, Leonid I
2006-07-05 20:14 ` Nikita Danilov
2006-07-05 18:10 Ananiev, Leonid I
2006-07-05 19:07 ` Nikita Danilov
2006-07-05 15:48 Ananiev, Leonid I
2006-07-05 14:28 Ananiev, Leonid I
2006-07-05 14:57 ` Nikita Danilov
2006-07-05 5:40 Ananiev, Leonid I
2006-07-05 10:17 ` Nikita Danilov
2006-07-04 19:12 Ananiev, Leonid I
2006-07-04 20:20 ` Nikita Danilov
2006-07-04 22:24 ` Bret Towe
2006-07-05 10:20 ` Nikita Danilov
2006-07-05 17:19 ` Bret Towe
[not found] <B41635854730A14CA71C92B36EC22AAC0541F6@mssmsx411>
2006-07-04 13:12 ` Nikita Danilov
2006-07-04 13:07 Ananiev, Leonid I
2006-07-04 11:43 Ananiev, Leonid I
2006-07-04 11:56 ` Nikita Danilov
2006-07-04 9:55 Nikita Danilov
2006-07-04 9:44 Ananiev, Leonid I
2006-07-04 8:35 Ananiev, Leonid I
2006-07-03 16:43 Ananiev, Leonid I
2006-07-04 8:32 ` Nikita Danilov
2006-06-27 5:31 Ananiev, Leonid I
2006-06-28 11:33 ` Nikita Danilov
2006-07-03 17:31 ` Antonio Vargas
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=17581.19022.234542.958272@gargle.gargle.HOWL \
--to=nikita@clusterfs.com \
--cc=Linux-Kernel@vger.kernel.org \
--cc=leonid.i.ananiev@intel.com \
--cc=magnade@gmail.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
all inboxes | Powered by JetHome®