From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753475Ab1C2NNG (ORCPT ); Tue, 29 Mar 2011 09:13:06 -0400 Received: from casper.infradead.org ([85.118.1.10]:51916 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932Ab1C2NND (ORCPT ); Tue, 29 Mar 2011 09:13:03 -0400 Subject: Re: [RFC] seqlock,lockdep: Add lock primitives to read_seqbegin(). From: Peter Zijlstra To: Tetsuo Handa Cc: mingo@redhat.com, linux-kernel@vger.kernel.org In-Reply-To: <201103261312.AEJ01293.OVFJFSLtHOFOMQ@I-love.SAKURA.ne.jp> References: <201103261312.AEJ01293.OVFJFSLtHOFOMQ@I-love.SAKURA.ne.jp> Content-Type: text/plain; charset="UTF-8" Date: Tue, 29 Mar 2011 15:14:54 +0200 Message-ID: <1301404494.2250.385.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2011-03-26 at 13:12 +0900, Tetsuo Handa wrote: > > But there is still a problem. It seems to me that lockdep checks for this bug > only when a new locking pattern (a locking pattern which was not already added > to lockdep database) is added. That's how it works. Why is that a problem? > This freeze can be triggered by running > > while :; do newns /sbin/pivot_root /proc/ /proc/sys/; done > > on one terminal and running > > while :; do /bin/ls -l /proc/*/exe; done > > on another terminal. (The "newns" is a program that unshares the mnt namespace > before execve() using CLONE_NEWNS.) But even after applying the patch above, > lockdep does not show the trace above. Then you're still missing something. > lockdep shows the trace above only after I run test programs for TOMOYO (which > causes a locking pattern that was generated by neither > "/sbin/pivot_root /proc/ /proc/sys/" nor "/bin/ls -l /proc/*/exe" to be added > to lockdep database). And tomoyo manages to close the cycle for some reason. > I think that we want some method for rechecking already added locking pattern. > Maybe it is run by (e.g.) every 60 seconds. Maybe it is run when stall checking > mechanisms report the possibility of stall. (The sysrq key didn't work after > the freeze occurred.) I don't get this, why would you need to recheck anything? lockdep does a full analysis on every addition, rechecking when nothing changed should not yield another result.