Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1749347imu; Wed, 12 Dec 2018 03:44:43 -0800 (PST) X-Google-Smtp-Source: AFSGD/WR4UiFuenC84XRZ5VU/31sWHw09alEIbAMOOxoergb3rPM/53aQsFVxmsOZyTzaZxjBcf/ X-Received: by 2002:a63:5518:: with SMTP id j24mr17704985pgb.208.1544615083759; Wed, 12 Dec 2018 03:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544615083; cv=none; d=google.com; s=arc-20160816; b=Bl7nEgB0sYMM5DoE1Z4OLVxak2M+zkd3lYZ/OIpkoCGGQeRbAFZbLapBinXP5d7tuN lRLUOvgoxdv9A+KoAIS4n/Dozhhuenf4bTSfHJb8xf82UAvsBorUC5TL61GAoVmW46qG a1dDJjmyvP/YciEEVobEKlYsUTpwdi9XFFkQn22rZJh/FgD5tE+anhbuI2Q8mTmKfKPI Bhls7wPqZtXd8NNvT7U+nl+fA8rB9aJFQ/B1TLGfeV8cBnzBbD/P0QEhramcFNdQW9o+ A4WNLGqo7+sb/lU8wMB6R9QxNsd7N1H7hPv6xE+WWhp87p5N8PsgdIEshHeTiHKCORWc DLeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cO9SEBmTeSjG5hJV2GYmUGZPU+/TZz/y527TWGrbuJs=; b=Cpx44+ANQopHUOjgTETL96mjeXJczLQQ+jirfSj7rE9nHbsN4/9/bZK40lQWYxG7A/ KsR78A+iCiKuHlQpV68sY66OyTQEkDExC3yDg5SJi6rMCwGRo8uXuRXs8KR5M4gZzI3h ES915cpcfY1IBBVTIdVD6vwr0vynSJkhltbnK14w8xTPAHaKcxhczsDui2w6j0XQysgS dHTOkLwq/z0eOoex2rw62Ul+UmZiaiiWNH1+af3z69OnYN2ypUn5NxdFH59HQ1SdYkjq 2XsIz8VDgQgRkBPHLBARQH9B7yKDOEwoMFqfT1Q/DQcx4S4gN6UXRA27OTjb0HepjGs7 M71A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=avLREWX9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c201si16178343pfb.211.2018.12.12.03.44.24; Wed, 12 Dec 2018 03:44:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=avLREWX9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727325AbeLLLnG (ORCPT + 99 others); Wed, 12 Dec 2018 06:43:06 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:55848 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbeLLLnG (ORCPT ); Wed, 12 Dec 2018 06:43:06 -0500 Received: by mail-it1-f194.google.com with SMTP id o19so8541527itg.5 for ; Wed, 12 Dec 2018 03:43:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cO9SEBmTeSjG5hJV2GYmUGZPU+/TZz/y527TWGrbuJs=; b=avLREWX9OVBvOxYB32E5uEnBLtkgLuwZwLPzvvDDCh2BIVk9ZkPIHj0YSx0Ds5lJ4W dgIiMFlHjk2Y5+vP+bh9DGlD2xI1a5bzw0S6adkLBIwuMV7Qtz2f4TCQB8eUZ4Yu9L1B 8EBKoL86e7NNMThIyhkaEsq/vVhEsUbW9mBRg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=cO9SEBmTeSjG5hJV2GYmUGZPU+/TZz/y527TWGrbuJs=; b=Nw1HktzEBYxdWtGRkfODWWP8Zd/RMbB2GcjvqO1chOcVPMeeSzknRn34FTaLTax0IW JyZLJzX8wHn5/akfSV/igvfz4s6tVrN19XNndJqRDm15UDZqq48/61+TN9Fb156VvpKX 4gPHUpGSgBoqB6JH38UNWQXwtXotHw+ZO8Mgg8AuHtxTJIjJDZ920v2Qk5EFtzQuvBeU AGqfUP8a5EDeNbkBAGa7oSPNtwF8I96rDRwVMi1/kOyqLeTLVPHJaCTXk2SyuKsX7vLO wygh3pVqYVPCGachBxmbU+rVoKZhoGMj2CCXfUK5bo4NRm/gpDvKOjGec0qUPRYr+rpv +Zlw== X-Gm-Message-State: AA+aEWbRwYDEj5GOlrpimWMaUvvz0Q2LJkQA4O/F37vsAfXeXxrhNk0a F6j14jXxSgXIxP+w6F+Tg3ayPjcuQZj82y5uF/XDEg== X-Received: by 2002:a24:9b87:: with SMTP id o129mr5730709itd.128.1544614985390; Wed, 12 Dec 2018 03:43:05 -0800 (PST) MIME-Version: 1.0 References: <20181212022506.171936-1-dbasehore@chromium.org> <20181212022506.171936-2-dbasehore@chromium.org> <20181212090901.GV5289@hirez.programming.kicks-ass.net> In-Reply-To: <20181212090901.GV5289@hirez.programming.kicks-ass.net> From: "dbasehore ." Date: Wed, 12 Dec 2018 03:42:54 -0800 Message-ID: Subject: Re: RFC [PATCH 1/1] locking/lockdep: Fix nest lock warning on unlock To: Peter Zijlstra , sboyd@kernel.org Cc: Ingo Molnar , will.deacon@arm.com, linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 12, 2018 at 1:09 AM Peter Zijlstra wrote: > > On Tue, Dec 11, 2018 at 06:25:06PM -0800, Derek Basehore wrote: > > The function __lock_acquire checks that the nest lock is held passed > > in as an argument. The issue with this is that __lock_acquire is used > > for internal bookkeeping on lock_release. This produces a false > > positive lockdep warning on unlock. Since you explicitly don't need to > > hold the nest lock on unlock, this is an issue. > > Who is triggering this? I'm writing code right now that triggers this. The goal is to reduce lock contention in the Common Clk Framework by getting rid of its global lock. One of the approaches I'm considering is adding a nest lock with n "subtree" locks. After locking all of the needed subtree locks, it's important to unlock the nest lock to reduce contention.