login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
June
»
12
Re: [patch] radix-tree: fix small lockless radix-tree bug
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Andrew Morton <akpm@...>
To: Nick Piggin <nickpiggin@...>
Cc: <peterz@...>, <linux-kernel@...>, <paulmck@...>
Subject:
Re: [patch] radix-tree: fix small lockless radix-tree bug
Date: Thursday, June 12, 2008 - 3:31 pm
On Fri, 13 Jun 2008 05:03:45 +1000 Nick Piggin <nickpiggin@yahoo.com.au> wrote:
quoted text
> Hi guys, > > Although this doesn't seem like cause for alarm (as per the analysis), > it may still be a good 2.6.26 candidate as we should have a few more > weeks of testing left. > > It should definitely go in -mm with the lockless pagecache patch. > > When shrinking a radix-tree, we do it in a lockless manner by atomically > switching the root pointer away from the redundant node (one that only > has a single entry in the left most slot), and switching it over to its > lone child. > > Because a lockless lookup may have got a reference to the parent and be > in the middle of deciding what to do with it while it is being swapped > away for its child. For this reason, we also have to keep it around and > in a valid state for the lookup to proceed and give a valid result, for > at least an RCU grace period. So we need to keep the child in the left > most slot there in case that is requested by the lookup. > > This is all pretty standard RCU stuff. It is worth repeating because > in my eagerness to obey the radix tree node constructor scheme, I had > broken this by zeroing the radix tree node before the grace period. > > Fix it by clearing those fields in the RCU callback. I would normally > want to rip out the constructor entirely, but radix tree nodes are one > of those places where they make sense (only few cachelines will be > touched soon after allocation). > > > This was never actually observed in any lockless pagecache testing or > using the test harness, but as a rare problem testing my scalable vmap > rewrite. > > Fortunately, it is not a problem anywhere lockless pagecache is used in > mainline kernels (pagecache probe is not a guarantee, and brd does not > have concurrent lookups and deletes). > > However, it would eventually pop up for someone using lockless pagecache :P >
OK, I give up. A cannot spot what you actually changed amongst all the code motion? --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch] radix-tree: fix small lockless radix-tree bug
, Nick Piggin
, (Thu Jun 12, 3:03 pm)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Paul E. McKenney
, (Fri Jun 13, 3:53 am)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Andrew Morton
, (Thu Jun 12, 3:34 pm)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Nick Piggin
, (Thu Jun 12, 3:47 pm)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Andrew Morton
, (Thu Jun 12, 3:31 pm)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Peter Zijlstra
, (Thu Jun 12, 3:38 pm)
Re: [patch] radix-tree: fix small lockless radix-tree bug
, Peter Zijlstra
, (Thu Jun 12, 3:15 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 005/196] Chinese: add translation of SubmittingDrivers
david
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Andrew Morton
Re: PROBLEM: high load average when idle
Karl Meyer
PROBLEM: 2.6.23-rc "NETDEV WATCHDOG: eth0: transmit timed out"
git
:
linux-netdev
:
Evgeniy Polyakov
Mark IPW2100 as BROKEN: Fatal interrupt. Scheduling firmware restart.
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 28/37] dccp: Integration of dynamic feature activation - part 3 (client side)
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
10 users
and
788 guests
online.
Online users
lose10poundsfa
jeanemcf
racebin
eddymartinezku
pargafin
hugomoya98
currencytradin
custody11
tvwallmountsrpn
kellyholmane
Syndicate