From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: Andi Kleen <ak@linux.intel.com>,
dave@sr71.net, linux-kernel@vger.kernel.org, mingo@kernel.org,
eranian@google.com, x86@kernel.org
Subject: Re: [PATCH 1/2] Use faster check for modules in backtrace on 64bit
Date: Thu, 2 Oct 2014 12:57:34 +0200 [thread overview]
Message-ID: <20141002105734.GD2849@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20140930200959.GB8196@two.firstfloor.org>
On Tue, Sep 30, 2014 at 10:10:00PM +0200, Andi Kleen wrote:
> > > Also I investigated it now, but we don't have RCU support for rbtrees.
> > > So it would need some kind of locking for the reader, which is a show
> > > stopper.
> >
> > Nah, we can trivially do that with a seqlock. Not read side locking
> > required in the normal case.
>
> I'm not convinced. It wouldn't surprise me if it was possible
> to generate endless cycles with rcu freed memory on some rebalancing
> operation.
I don't think so, every (tree) rotation still maintains the tree as a
tree, therefore downward iteration will always get you to the end.
You might temporarily run in circles until you observe the new pointers,
but that is not a problem, and strictly limited to however long it takes
for the new pointers to become visible on the iterating CPU.
Deletion should not be a problem either, if the deleted node retains
pointers, they'll point back into the tree, and by the previous
argument, downward iteration terminates.
> If you think I'm wrong please show working code.
That is unrelated to the above, you're just not willing to work on it.
Which is fine, then this problem will remain for a little while longer.
> Also please explain clearly for the module maintainers and me
> what the problem with my original simple trivially show
> to be correct solution is.
It is not correct, you yourself said there were false positives with it.
But the biggest issue is that its x86_64 only.
next prev parent reply other threads:[~2014-10-02 10:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 23:31 Optimize backtrace code for perf PMI handler Andi Kleen
2014-09-26 23:31 ` [PATCH 1/2] Use faster check for modules in backtrace on 64bit Andi Kleen
2014-09-29 11:42 ` Peter Zijlstra
2014-09-29 15:21 ` Andi Kleen
2014-09-29 20:30 ` Andi Kleen
2014-09-30 8:58 ` Peter Zijlstra
2014-09-30 20:10 ` Andi Kleen
2014-10-02 10:57 ` Peter Zijlstra [this message]
2014-10-03 23:20 ` Andi Kleen
2014-09-26 23:31 ` [PATCH 2/2] x86: Only do a single page fault for copy_from_user_nmi Andi Kleen
2014-09-29 11:56 ` Peter Zijlstra
2014-09-29 15:26 ` Andi Kleen
2014-10-03 4:53 ` Ingo Molnar
2014-10-03 23:25 ` Andi Kleen
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=20141002105734.GD2849@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=dave@sr71.net \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/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.