All of lore.kernel.org
 help / color / mirror / Atom feed
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:56:32 -0600	[thread overview]
Message-ID: <57460370.5090905@kernel.dk> (raw)
In-Reply-To: <5745FC91.5010408@kernel.dk>

On 05/25/2016 01:27 PM, Jens Axboe wrote:
> 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.

I did that:

http://git.kernel.dk/cgit/fio/commit/?id=34febb23fa9c7b9b0d54c324effff1a808a8fe6e

-- 
Jens Axboe



      reply	other threads:[~2016-05-25 19:56 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
2016-05-25 19:56     ` Jens Axboe [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=57460370.5090905@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 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.