From: Artem Bityutskiy <dedekind1@gmail.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH, RFC] simplify writeback thread creation
Date: Thu, 08 Jul 2010 10:08:17 +0300 [thread overview]
Message-ID: <1278572897.12733.70.camel@localhost> (raw)
In-Reply-To: <20100707225242.GA28802@lst.de>
Thanks Christoph,
I'll try to test it in my environment.
On Thu, 2010-07-08 at 00:52 +0200, Christoph Hellwig wrote:
> Currently the per-bdi writeback thread is only created when there is
> dirty any dirty data on the BDI, and it lazy exists when it's been
> unused for some time.
>
> This leads to some very complex code, and the need to keep a forker
> thread around.
I'd add here a comment that due to the complexity it is not bug-free -
e.g., I pointed to the race between thread suicide and wake-up.
Also I'd add a comment that it leads to more thread types waking up
periodically and consuming power. With just one thread type it is easier
to fix this issue.
> This patch removes all this code and simply creates the thread as part
> of the bdi registration. The downside is that we use up ressoures
> for possible unused devices, although that overhead is rather low,
> with 8k kernel stack size on x86 and few other, even smaller ressources.
s/ressources/resources/
:-)
On the other hand, there was a message that process IDs are precious
resource on large NUMA systems. So, less suicides, more free IDs :-) But
this is just a minor note.
> If the overhead is still considered too much I can look into starting
> the thread explicitly instead of as part of the bdi registration, but
> that will require a bit of code complexity, too.
Well, the threads can exit, then we need:
1. when adding bdi works and the thread exited, forr it.
2. the same should be done in __mark_inode_dirty - if the bdi thread is
dead, create it.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-07-08 7:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 22:52 [PATCH, RFC] simplify writeback thread creation Christoph Hellwig
2010-07-08 7:08 ` Artem Bityutskiy [this message]
2010-07-08 12:20 ` Jens Axboe
2010-07-08 14:21 ` Artem Bityutskiy
2010-07-08 14:59 ` Jens Axboe
2010-07-08 15:23 ` Artem Bityutskiy
2010-07-08 17:23 ` Jens Axboe
2010-07-08 18:43 ` Artem Bityutskiy
2010-07-08 18:48 ` Christoph Hellwig
2010-07-09 7:52 ` Artem Bityutskiy
2010-07-09 8:16 ` Jens Axboe
2010-07-09 11:06 ` Theodore Tso
2010-07-09 14:51 ` Christoph Hellwig
2010-07-09 15:49 ` Artem Bityutskiy
2010-07-08 13:22 ` Artem Bityutskiy
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=1278572897.12733.70.camel@localhost \
--to=dedekind1@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.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 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.