From: Jens Axboe <axboe@kernel.dk>
To: Jan Kara <jack@suse.cz>, fio@vger.kernel.org
Subject: Re: [PATCH 2/2] Fix occasional hangs on mutexes
Date: Wed, 25 May 2016 13:27:13 -0600 [thread overview]
Message-ID: <5745FC91.5010408@kernel.dk> (raw)
In-Reply-To: <1464102202-16724-2-git-send-email-jack@suse.cz>
On 05/24/2016 09:03 AM, Jan Kara wrote:
> When running xfstest generic/299 using fio on my test machine using
> ramdisk as a backing store, I have noticed that fio often hangs waiting
> for td->io_u_lock. After some debugging I have found out the reason is
> that mutexes are created as process-private by default and but this
> mutex is actually manipulated from several processes. The hang is not
> obvious immediately as the mutex is located in shared memory and thus
> while the locking is resolved in userspace, everything works as
> expected. Only once we use kernel futexes, the process is not properly
> woken up when futex is released.
>
> Fix the problem by marking all mutexes and conditional variables that
> are located in shared memory as shared.
Thanks Jan, applied both 1 and 2.
Would be nice to factor out the cv/mutex init code, so we don't have to
essentially copy/paste it wherever we want to have process shared
mutexes or cond vars.
--
Jens Axboe
next prev parent reply other threads:[~2016-05-25 19:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-24 15:03 [PATCH 1/2] fio: Simplify forking of processes Jan Kara
2016-05-24 15:03 ` [PATCH 2/2] Fix occasional hangs on mutexes Jan Kara
2016-05-25 19:27 ` Jens Axboe [this message]
2016-05-25 19:56 ` Jens Axboe
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=5745FC91.5010408@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=jack@suse.cz \
/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