From: Ted Ts'o <tytso@mit.edu>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org, sandeen@redhat.com
Subject: Re: [PATCH] ext4: fix lazyinit thread prevent from sleep
Date: Mon, 25 Oct 2010 10:46:34 -0400 [thread overview]
Message-ID: <20101025144634.GD16981@thunk.org> (raw)
In-Reply-To: <1287773865-31168-1-git-send-email-lczerner@redhat.com>
On Fri, Oct 22, 2010 at 08:57:45PM +0200, Lukas Czerner wrote:
> In my test lazyinit threat (in linux-next tree) consumes too much CPU
> (90%). The reason is that there is a bug preventing the threat to sleep
> and hence it keeps walking the li_request_list until the time for next
> scheduled request comes.
>
> It is because the next_wakeup is originally set to jiffies - 1 so the
> thread is assuming that there is no reason to sleep, because the time
> for next scheduled event is already came, however that is not true.
>
> I have fixed that by setting next_wakeup to MAX_JIFFY_OFFSET initially
> and than setting value of the next scheduled request (the one with the
> smallest lr_next_sched value). It has been tested and now the CPU
> utilization of lazyinit thread is under 1% (with one request in the list).
>
> Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Thanks, I've merged this into the lazy-init patch in the ext4 patch queue.
- Ted
prev parent reply other threads:[~2010-10-25 14:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-22 18:57 [PATCH] ext4: fix lazyinit thread prevent from sleep Lukas Czerner
2010-10-25 14:46 ` Ted Ts'o [this message]
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=20101025144634.GD16981@thunk.org \
--to=tytso@mit.edu \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@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.