From: Joel Becker <jlbec@evilplan.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH] ocfs2: Avoid livelock in ocfs2_readpage()
Date: Thu, 28 Jul 2011 02:08:26 -0700 [thread overview]
Message-ID: <20110728090825.GC9495@noexit.corp.google.com> (raw)
In-Reply-To: <1308862307-15626-1-git-send-email-jack@suse.cz>
On Thu, Jun 23, 2011 at 10:51:47PM +0200, Jan Kara wrote:
> When someone writes to an inode, readers accessing the same inode via
> ocfs2_readpage() just busyloop trying to get ip_alloc_sem because
> do_generic_file_read() looks up the page again and retries ->readpage()
> when previous attempt failed with AOP_TRUNCATED_PAGE. When there are enough
> readers, they can occupy all CPUs and in non-preempt kernel the system is
> deadlocked because writer holding ip_alloc_sem is never run to release the
> semaphore. Fix the problem by making reader block on ip_alloc_sem to break
> the busy loop.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
This patch is now in the fixes branch of ocfs2.git.
Joel
--
Life's Little Instruction Book #30
"Never buy a house without a fireplace."
http://www.jlbec.org/
jlbec at evilplan.org
prev parent reply other threads:[~2011-07-28 9:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-23 20:51 [Ocfs2-devel] [PATCH] ocfs2: Avoid livelock in ocfs2_readpage() Jan Kara
2011-06-24 20:55 ` Sunil Mushran
2011-06-24 21:44 ` Jan Kara
2011-06-26 7:26 ` Joel Becker
2011-06-27 10:47 ` Jan Kara
2011-07-28 9:08 ` Joel Becker [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=20110728090825.GC9495@noexit.corp.google.com \
--to=jlbec@evilplan.org \
--cc=ocfs2-devel@oss.oracle.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.