From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753567Ab3INIpU (ORCPT ); Sat, 14 Sep 2013 04:45:20 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:9162 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531Ab3INIpR (ORCPT ); Sat, 14 Sep 2013 04:45:17 -0400 Message-ID: <52342190.1000409@huawei.com> Date: Sat, 14 Sep 2013 16:42:56 +0800 From: Li Zefan User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: John Stultz CC: lkml , Mathieu Desnoyers , Steven Rostedt , Peter Zijlstra , Ingo Molnar , Thomas Gleixner Subject: Re: [PATCH 1/2] [RFC v2] seqcount: Add lockdep functionality to seqcount/seqlock structures References: <1379117948-7385-1-git-send-email-john.stultz@linaro.org> In-Reply-To: <1379117948-7385-1-git-send-email-john.stultz@linaro.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.135.68.215] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2013/9/14 8:19, John Stultz wrote: > Currently seqlocks and seqcounts don't support lockdep. > > After running across a seqcount related deadlock in the timekeeping > code, I used a less-refined and more focused varient of this patch > to narrow down the cause of the issue. > > This is a first-pass attempt to properly enable lockdep functionality > on seqlocks and seqcounts. > > Since seqcounts are used in the vdso gettimeofday code, I've provided > lockdep accessors. > > I've also handled one cases where there were nested seqlock writers > and there may be more edge cases. > > Comments and feedback would be appreciated! > Could you describe how seqlocks/seqcounts can lead to deadlock in the changelog? > Cc: Mathieu Desnoyers > Cc: Li Zefan > Cc: Steven Rostedt > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Thomas Gleixner > Signed-off-by: John Stultz > --- > v2: > * Update to new simplified lockdep.h > * vdso accessor simplifications > * removed needless preempt_disable > * removed unneeded ifdefs