From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932941AbWFWIjZ (ORCPT ); Fri, 23 Jun 2006 04:39:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932942AbWFWIjZ (ORCPT ); Fri, 23 Jun 2006 04:39:25 -0400 Received: from smtp106.mail.mud.yahoo.com ([209.191.85.216]:49250 "HELO smtp106.mail.mud.yahoo.com") by vger.kernel.org with SMTP id S932941AbWFWIjY (ORCPT ); Fri, 23 Jun 2006 04:39:24 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=I9ZSZzU4Wn6ZVPw4S/mM8oO0cVdpcbSZkTz0x8Ufk4RwKCmnXFHGMUve+ZP1F4C9DbYI94uyw41UbByorxhHPM2BS6UO7gnMsTRprHbgxD9Y0njwWPIQYeH9aQM80LdBMlqhOvvgIilkpxZQm5hFLIYsc0Lq0+MYGNK1/8z7+/s= ; Message-ID: <449BA8BB.3070402@yahoo.com.au> Date: Fri, 23 Jun 2006 18:39:23 +1000 From: Nick Piggin User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 X-Accept-Language: en MIME-Version: 1.0 To: Andrew Morton CC: Nick Piggin , paulmck@us.ibm.com, benh@kernel.crashing.org, Paul.McKenney@us.ibm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [patch 3/3] radix-tree: RCU lockless readside References: <20060408134635.22479.79269.sendpatchset@linux.site> <20060408134707.22479.33814.sendpatchset@linux.site> <20060622014949.GA2202@us.ibm.com> <20060622154518.GA23109@wotan.suse.de> <20060622163032.GC1295@us.ibm.com> <20060622165551.GB23109@wotan.suse.de> <20060622174057.GF1295@us.ibm.com> <20060622181111.GD23109@wotan.suse.de> <20060623000901.bf8b46c5.akpm@osdl.org> In-Reply-To: <20060623000901.bf8b46c5.akpm@osdl.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton wrote: > On Thu, 22 Jun 2006 20:11:12 +0200 > Nick Piggin wrote: > > >>On Thu, Jun 22, 2006 at 10:40:57AM -0700, Paul E. McKenney wrote: >> >>>On Thu, Jun 22, 2006 at 06:55:51PM +0200, Nick Piggin wrote: >>> >>>>No problem, will change. >>> >>>Thank you! >> >>OK, and with that I believe I've covered all your concerns. >> >>Attached is the incremental patch (plus a little bit of fuzz >>that's gone to Andrew). The big items are: >> >>- documentation, clarification of comments >>- tag lookups are now RCU safe (tested with harness) >>- cleanups of various misuses of rcu_ API that Paul spotted >>- thought I might put in a copyright -- is this OK? >> >>Andrew, please apply. > > > Freeing unused kernel memory: 316k freed > Write protecting the kernel read-only data: 384k > No module found in object > No module found in object > No module found in object > No module found in object > input: AT Translated Set 2 keyboard as /class/input/input0 > No module found in object > EXT3-fs: INFO: recovery required on readonly filesystem. > EXT3-fs: write access will be enabled during recovery. > kjournald starting. Commit interval 5 seconds > EXT3-fs: recovery complete. > EXT3-fs: mounted filesystem with ordered data mode. > BUG: NMI Watchdog detected LOCKUP on CPU0, eip c0264345, registers: > CPU: 0 > EIP is at radix_tree_gang_lookup_tag+0x105/0x1a0 > eax: ffffffff ebx: 00000040 ecx: ffffffc0 edx: 00000007 > esi: e701e9d8 edi: 000001c0 ebp: e6fbddd8 esp: e6fbdda8 > ds: 007b es: 007b ss: 0068 > Process fsck.ext3 (pid: 1565, ti=e6fbc000 task=c1fbcb90 task.ti=e6fbc000) > Stack: e77f2dc4 e701e9d8 e701e9d8 00000002 00000fff 00000000 e701e8c8 e6fbde60 > 0000000e c1c6c52c e6fbde60 c1c6c538 e6fbde00 c014b68f c1c6c52c e6fbde60 > 00000000 0000000e 00000000 e6fbde58 00000000 00000001 e6fbde20 c0155631 > Call Trace: > Code: 89 fa 8d 4c 09 fa d3 e3 d3 ea 89 d9 83 e2 3f f7 d9 eb 13 8d 76 00 89 f8 89 df 21 c8 01 c7 74 26 42 83 fa 40 74 95 0f a3 16 19 c0 <85> c0 74 e7 83 7d dc 01 74 3a 31 f6 89 75 f0 e9 6e ff ff ff c7 > console shuts up ... > > > Not sure why, either. It all looks like an equivalent transformation to > me. > > fwiw, here's what I tested: Arggh, line 755 has an extra semicolon. I caught and fixed this in the rtth tree, but obviously forgot to transfer it over. > @@ -741,15 +740,19 @@ __lookup_tag(struct radix_tree_node *slo > for ( ; j < RADIX_TREE_MAP_SIZE; j++) { > index++; > if (tag_get(slot, tag, j)) { > - BUG_ON(slot->slots[j] == NULL); > - results[nr_found++] = slot->slots[j]; > - if (nr_found == max_items) > - goto out; > + struct radix_tree_node *node = slot->slots[j]; > + if (node) { > + results[nr_found++] = rcu_dereference(node); > + if (nr_found == max_items) > + goto out; > + } > } > } > } > shift -= RADIX_TREE_MAP_SHIFT; > - slot = slot->slots[i]; > + slot = rcu_dereference(slot->slots[i]); > + if (slot == NULL); > + break; > } ^^^^^^^^ Up there. -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com