All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Nikos Tsironis <ntsironis@arrikto.com>
Cc: dm-devel@redhat.com, Mikulas Patocka <mpatocka@redhat.com>,
	Scott Wood <swood@redhat.com>,
	Ilias Tsitsimpis <iliastsi@arrikto.com>
Subject: Re: [PATCH 1/2] dm-snapshot: fix crash with the realtime kernel
Date: Mon, 11 Nov 2019 20:14:44 -0500	[thread overview]
Message-ID: <20191112011444.GA32220@redhat.com> (raw)
In-Reply-To: <c9a772e9-e305-cf0b-1155-fb19bdb84e55@arrikto.com>

On Mon, Nov 11 2019 at 11:37am -0500,
Nikos Tsironis <ntsironis@arrikto.com> wrote:

> On 11/11/19 3:59 PM, Mikulas Patocka wrote:
> > Snapshot doesn't work with realtime kernels since the commit f79ae415b64c.
> > hlist_bl is implemented as a raw spinlock and the code takes two non-raw
> > spinlocks while holding hlist_bl (non-raw spinlocks are blocking mutexes
> > in the realtime kernel, so they couldn't be taken inside a raw spinlock).
> > 
> > This patch fixes the problem by using non-raw spinlock
> > exception_table_lock instead of the hlist_bl lock.
> > 
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Fixes: f79ae415b64c ("dm snapshot: Make exception tables scalable")
> > 
> 
> Hi Mikulas,
> 
> I wasn't aware that hlist_bl is implemented as a raw spinlock in the
> real time kernel. I would expect it to be a standard non-raw spinlock,
> so everything works as expected. But, after digging further in the real
> time tree, I found commit ad7675b15fd87f1 ("list_bl: Make list head
> locking RT safe") which suggests that such a conversion would break
> other parts of the kernel.

Right, the proper fix is to update list_bl to work on realtime (which I
assume the referenced commit does).  I do not want to take this
dm-snapshot specific workaround that open-codes what should be done
within hlist_{bl_lock,unlock}, etc.

I'm not yet sure which realtime mailing list and/or maintainers should
be cc'd to further the inclussion of commit ad7675b15fd87f1 -- Nikos do
you?

Thanks,
Mike

  reply	other threads:[~2019-11-12  1:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 13:59 [PATCH 1/2] dm-snapshot: fix crash with the realtime kernel Mikulas Patocka
2019-11-11 16:37 ` Nikos Tsironis
2019-11-12  1:14   ` Mike Snitzer [this message]
2019-11-12  7:50     ` Mikulas Patocka
2019-11-12 11:45       ` Nikos Tsironis
2019-11-13  6:01         ` Scott Wood
2019-11-12 15:34 ` Mike Snitzer
2019-11-12 15:57   ` Mikulas Patocka
2019-11-12 16:06     ` Mike Snitzer

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=20191112011444.GA32220@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=iliastsi@arrikto.com \
    --cc=mpatocka@redhat.com \
    --cc=ntsironis@arrikto.com \
    --cc=swood@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.