From: Matthew Wilcox <matthew@wil.cx>
To: David Chinner <dgc@sgi.com>
Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] Remove l_flushsema
Date: Wed, 30 Apr 2008 04:24:17 -0600 [thread overview]
Message-ID: <20080430102417.GK14976@parisc-linux.org> (raw)
In-Reply-To: <20080430090502.GH14976@parisc-linux.org>
On Wed, Apr 30, 2008 at 03:05:03AM -0600, Matthew Wilcox wrote:
> @@ -2385,12 +2379,13 @@ restart:
>
> iclog = log->l_iclog;
> if (! (iclog->ic_state == XLOG_STATE_ACTIVE)) {
> - log->l_flushcnt++;
> + DEFINE_WAIT(wait);
> + prepare_to_wait(&log->l_flush_wq, &wait, TASK_UNINTERRUPTIBLE);
> spin_unlock(&log->l_icloglock);
> xlog_trace_iclog(iclog, XLOG_TRACE_SLEEP_FLUSH);
> XFS_STATS_INC(xs_log_noiclogs);
> - /* Ensure that log writes happen */
> - psema(&log->l_flushsema, PINOD);
> + /* Wait for log writes to have flushed */
> + schedule();
> goto restart;
> }
> ASSERT(iclog->ic_state == XLOG_STATE_ACTIVE);
Christoph points out that this is missing a call to finish_wait() after
schedule() and he's absolutely right. It only matters if the task was
woken up by something other than being on this wait queue, so my testing
didn't notice it missing.
--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."
next prev parent reply other threads:[~2008-04-30 10:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 9:05 [PATCH] Remove l_flushsema Matthew Wilcox
2008-04-30 10:24 ` Matthew Wilcox [this message]
2008-04-30 10:41 ` David Chinner
2008-04-30 10:58 ` Christoph Hellwig
2008-04-30 11:11 ` David Chinner
2008-04-30 11:52 ` Matthew Wilcox
2008-04-30 12:14 ` David Chinner
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=20080430102417.GK14976@parisc-linux.org \
--to=matthew@wil.cx \
--cc=dgc@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=xfs@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).