login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
August
»
20
Re: [PATCH 1/2] radix-tree: clear all tags in radix_tree_node_rcu_free
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Jan Kara
Subject:
Re: [PATCH 1/2] radix-tree: clear all tags in radix_tree_node_rcu_free
Date: Friday, August 20, 2010 - 6:00 am
On Fri 20-08-10 15:22:06, Dave Chinner wrote:
quoted text
> From: Dave Chinner <dchinner@redhat.com> > > Commit f446daaea9d4a420d16c606f755f3689dcb2d0ce ("mm: implement > writeback livelock avoidance using page tagging") introduced a new > radix tree tag, increasing the number of tags in each node from 2 to > 3. It did not, however, fix up the code in > radix_tree_node_rcu_free() that cleans up after radix_tree_shrink() > and hence could leave stray tags set in the new tag array. > > The result is that the livelock avoidance code added in the the > above commit would hit stale tags when doing tag based lookups, > resulting in livelocks when trying to traverse the tree. > > Fix this problem in radix_tree_node_rcu_free() so it doesn't happen > again in the future by using a loop to walk all the tags up to > RADIX_TREE_MAX_TAGS to clear the stray tags radix_tree_shrink() > leaves behind.
The patch looks good. Thanks! Acked-by: Jan Kara <jack@suse.cz> Honza
quoted text
> > Signed-off-by: Dave Chinner <dchinner@redhat.com> > --- > lib/radix-tree.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/lib/radix-tree.c b/lib/radix-tree.c > index e907858..1014171 100644 > --- a/lib/radix-tree.c > +++ b/lib/radix-tree.c > @@ -174,14 +174,16 @@ static void radix_tree_node_rcu_free(struct rcu_head *head) > { > struct radix_tree_node *node = > container_of(head, struct radix_tree_node, rcu_head); > + int i; > > /* > * must only free zeroed nodes into the slab. radix_tree_shrink > * can leave us with a non-NULL entry in the first slot, so clear > * that here to make sure. > */ > - tag_clear(node, 0, 0); > - tag_clear(node, 1, 0); > + for (i = 0; i < RADIX_TREE_MAX_TAGS; i++) > + tag_clear(node, i, 0); > + > node->slots[0] = NULL; > node->count = 0; > > -- > 1.7.1 >
-- Jan Kara <jack@suse.cz> SUSE Labs, CR --
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 1/2] radix-tree: clear all tags in radix_tree_node_ ...
, Dave Chinner
, (Thu Aug 19, 10:22 pm)
Re: [PATCH 1/2] radix-tree: clear all tags in radix_tree_n ...
, Nick Piggin
, (Fri Aug 20, 1:00 am)
Re: [PATCH 1/2] radix-tree: clear all tags in radix_tree_n ...
, Jan Kara
, (Fri Aug 20, 6:00 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-activists
:
Honoo Suzuki n-2423
Q:Disk doubler for linux?
H.J. Lu
Re: Problems w/ SLS and Ultrastor
Daniel Brahneborg
Re: Linux Screen Capture
Tushar D Chandra
ARCNET info wanted ...
Nicolai Langfeldt
***** README: How to find answers to your linux questions. *****
openfabrics-general
:
Or Gerlitz
[ofa-general] [PATCH] ib/ipoib: handle Gratuitous ARP & bonding failover race ...
Chris Worley
Re: [Scst-devel] [ofa-general] WinOF_2_0_5/SRP initiator: slow reads and eventual...
Chuck Hartley
[ofa-general] OFED 1.2.5.4 build fails for kernel 2.6.23
Vu Pham
Re: [Fwd: Re: [ofa-general] [NFS/RDMA] Can't mount NFS/RDMA partition]]
Celine Bourde
Re: [Fwd: Re: [ofa-general] [NFS/RDMA] Can't mount NFS/RDMA partition]]
freebsd-fs
:
Peter Schuller
kern.geom.debugflags=16 does NOT allow me to write to device
Danny Carroll
Re: Areca vs. ZFS performance testing.
Sam Fourman Jr.
Re: Locked up processes after upgrade to ZFS v15
Andrew Hill
ZFS lockup in "zfs" state
Jeremy Chadwick
Re: Areca vs. ZFS performance testing.
linux-usb-devel
:
Mike Nuss
Re: Kernel panic with PCI EHCI on AMCC Sequoia
Oliver Neukum
Re: [linux-pm] Re: The evilness of struct usb_device->auto_pm
Greg Kroah-Hartman
[PATCH 038/149] USB: use function attribute __maybe_unused
Joseph Kim
how to mount gadgetfs?? please help me..
Greg KH
Re: [PATCH] EHCI: fix bug in refcounting code
open-graphics
:
Dieter
[Open-graphics] Re: X-video-server
nico
Re: [Open-graphics] Looking towards the future: Graphics technology
Peter Stuge
Re: [Open-graphics] Re: Text mode notes
Timothy Normand Miller
[Open-graphics] Synthesizing oga1hq
Timothy Normand Miller
[Open-graphics] O'Reilly OSCON 2007
Colocation donated by:
Syndicate