From: John Stultz <john.stultz@linaro.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Li Zefan <lizefan@huawei.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH 2/4] [RFC] seqcount: Add lockdep functionality to seqcount/seqlock structures
Date: Thu, 26 Sep 2013 13:59:24 -0700 [thread overview]
Message-ID: <5244A02C.4050700@linaro.org> (raw)
In-Reply-To: <20130926164600.5b91227e@gandalf.local.home>
On 09/26/2013 01:46 PM, Steven Rostedt wrote:
> On Thu, 26 Sep 2013 11:34:22 -0700
> John Stultz <john.stultz@linaro.org> wrote:
>
>> @@ -156,10 +214,19 @@ static inline void write_seqcount_begin(seqcount_t *s)
>> {
>> s->sequence++;
>> smp_wmb();
>> + seqcount_acquire(&s->dep_map, 0, 0, _RET_IP_);
>> +}
>> +
>> +static inline void write_seqcount_begin_nested(seqcount_t *s, int subclass)
>> +{
>> + s->sequence++;
>> + smp_wmb();
>> + seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_);
>> }
> For more code reuse, I wonder if we should have:
>
> static inline void write_seqcount_begin(seqcount_t *s)
> {
> write_seqcount_begine_nested(s, 0);
> }
>
> -- Steve
Good idea! Done.
Thanks for the review!
-john
next prev parent reply other threads:[~2013-09-26 20:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 18:34 [PATCH 0/4][RFC] Lockdep enablement for seqcount/seqlocks John Stultz
2013-09-26 18:34 ` [PATCH 1/4] [RFC] net: Explicitly initialize u64_stats_sync structures for lockdep John Stultz
2013-09-26 19:26 ` Eric Dumazet
2013-09-26 19:34 ` John Stultz
2013-09-26 19:39 ` John Stultz
2013-09-26 19:46 ` Eric Dumazet
2013-09-27 5:44 ` Ingo Molnar
2013-09-27 9:15 ` Eric Dumazet
2013-09-26 18:34 ` [PATCH 2/4] [RFC] seqcount: Add lockdep functionality to seqcount/seqlock structures John Stultz
2013-09-26 20:46 ` Steven Rostedt
2013-09-26 20:59 ` John Stultz [this message]
2013-09-26 18:34 ` [PATCH 3/4] [RFC] cpuset: Fix potential deadlock w/ set_mems_allowed John Stultz
2013-09-26 18:34 ` [PATCH 4/4] [RFC] ipv6: Fix for possible ipv6 seqlock deadlock John Stultz
2013-09-26 19:30 ` Eric Dumazet
2013-09-26 19:46 ` John Stultz
2013-09-27 5:47 ` Ingo Molnar
2013-09-27 16:00 ` John Stultz
2013-09-27 17:51 ` Eric Dumazet
2013-10-07 22:51 [PATCH 0/4] Lockdep enablement for seqcount/seqlocks (v2) John Stultz
2013-10-07 22:51 ` [PATCH 2/4] [RFC] seqcount: Add lockdep functionality to seqcount/seqlock structures John Stultz
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=5244A02C.4050700@linaro.org \
--to=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome