Linux Device Mapper development
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@suse.com>
To: Benjamin Marzinski <bmarzins@redhat.com>
Cc: Bart Van Assche <Bart.VanAssche@wdc.com>,
	device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH v2 1/7] libmultipath: fix tur checker locking
Date: Mon, 12 Feb 2018 20:16:26 +0100	[thread overview]
Message-ID: <1518462986.2761.61.camel@suse.com> (raw)
In-Reply-To: <20180212184450.GZ14513@octiron.msp.redhat.com>

On Mon, 2018-02-12 at 12:44 -0600, Benjamin Marzinski wrote:
> On Sat, Feb 10, 2018 at 08:42:31PM +0100, Martin Wilck wrote:
> > On Sat, 2018-02-10 at 17:11 +0100, Martin Wilck wrote:
> > > On Fri, 2018-02-09 at 18:36 -0600, Benjamin Marzinski wrote:
> > > > On Sat, Feb 10, 2018 at 12:36:05AM +0100, Martin Wilck wrote:
> > > > > On Sat, 2018-02-10 at 00:28 +0100, Martin Wilck wrote:
> > > > > > Maybe it's easier than we thought. Attached is a patch on
> > > > > > top
> > > > > > of
> > > > > > yours that I think might work, please have a look. 
> > > > > > 
> > > > > 
> > > > > That one didn't even compile. This one is better.
> > > > > 
> > > > > Martin
> > > > 
> > > > How about this one instead. The idea is that once we are in the
> > > > cleanup
> > > > handler, we just cleanup and exit. But before we enter it, we
> > > > atomically
> > > > exchange running, and if running was 0, we pause(), since the
> > > > checker
> > > > is
> > > > either about to cancel us, or already has.
> > > > 
> > > 
> > > Yes, that should work. Nice.
> > 
> > ... but I just realized that we don't rcu_register_thread() the TUR
> > thread. Maybe we should if we use RCU primitives?
> 
> Looking online, I see this.
> 
> "void rcu_register_thread(void): For all RCU flavors other than
> bullet-proof RCU, each thread must invoke this function before its
> first
> call to rcu_read_lock() or call_rcu(). If a given thread never
> invokes
> any RCU read-side functions, it need not invoke
> rcu_register_thread(void)."
> 
> That makes it sound like this is unnecessary for using the atomic
> operations. Did you see something that makes you think differently? I
> probably won't hurt to add it anyway. But, if it's fuzzy how to
> correctly use the rcu operations, we could just go back to wrapping
> normal operations in a spin_lock, now that we have a method that's
> not
> excessively complicated, and would only require holding the lock for
> simple variable manipulations.

OK, it's not strictly necessary then. Thanks for checking.
I wouldn't prefer going back to spinlocks. I think the atomic
operations are a step in the right direction.

Martin

-- 
Dr. Martin Wilck <mwilck@suse.com>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  reply	other threads:[~2018-02-12 19:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 23:56 [PATCH v2 0/7] multipath: miscellaneous bug fixes Benjamin Marzinski
2018-02-08 23:56 ` [PATCH v2 1/7] libmultipath: fix tur checker locking Benjamin Marzinski
2018-02-09 16:15   ` Bart Van Assche
2018-02-09 17:26     ` Benjamin Marzinski
2018-02-09 17:42       ` Bart Van Assche
2018-02-09 20:30   ` Martin Wilck
2018-02-09 23:04     ` Benjamin Marzinski
2018-02-09 23:28       ` Martin Wilck
2018-02-09 23:36         ` Martin Wilck
2018-02-10  0:17           ` Benjamin Marzinski
2018-02-10 16:03             ` Martin Wilck
2018-02-10  0:36           ` Benjamin Marzinski
2018-02-10 16:11             ` Martin Wilck
2018-02-10 19:42               ` Martin Wilck
2018-02-12 18:44                 ` Benjamin Marzinski
2018-02-12 19:16                   ` Martin Wilck [this message]
2018-02-08 23:56 ` [PATCH v2 2/7] multipath: fix DEF_TIMEOUT use Benjamin Marzinski
2018-02-08 23:56 ` [PATCH v2 3/7] multipathd: remove coalesce_paths from ev_add_map Benjamin Marzinski
2018-02-12 20:30   ` Martin Wilck
2018-02-08 23:56 ` [PATCH v2 4/7] multipathd: remove unused configure parameter Benjamin Marzinski
2018-02-08 23:56 ` [PATCH v2 5/7] Fix set_no_path_retry() regression Benjamin Marzinski
2018-02-12 20:13   ` Martin Wilck
2018-02-08 23:56 ` [PATCH v2 6/7] multipathd: change spurious uevent msg priority Benjamin Marzinski
2018-02-08 23:56 ` [PATCH v2 7/7] multipath: print sysfs state in fast list mode Benjamin Marzinski
2018-02-12 20:33   ` Martin Wilck

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=1518462986.2761.61.camel@suse.com \
    --to=mwilck@suse.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox