Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp547969rwl; Wed, 29 Mar 2023 05:41:43 -0700 (PDT) X-Google-Smtp-Source: AKy350b4g5s67nweriaIXnGPboF3F7dV24c4QWthc9+TJLRY0chrayxDzu7XsV0w7Im4K51FtWdm X-Received: by 2002:a17:906:6a2a:b0:878:711d:9310 with SMTP id qw42-20020a1709066a2a00b00878711d9310mr22784831ejc.1.1680093703304; Wed, 29 Mar 2023 05:41:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680093703; cv=none; d=google.com; s=arc-20160816; b=I1M1wdFanVJJEcSgEBmnDiKTTA1kAC0PJx01kleOADYSmL8+zcDQhoZ5h5pTB5YOen siaZmQXxkXpxG3vGScjv7GorhjZ7ZR0RoMjuAFf+GLJnp3jRgQPbzECMi/1CeeHdY8VE 6nc7UwJ93A1iPUmd/ewVm8aKWH819D9+n7Wf4xUS1i2+1fjNhSnxd3mbH2hfEI0nPSV0 Q7P2/g5PI5t/d1muVvdSvbOgjEyXZrkFBtk6sfqlzctAtIfqB4Y+p53RczclIwo468Sf Ph1wLObMFvbutheKTRbBJHBiuq1P6Vqz8G5UpkbLE1EQCqwY8UAS7RiNuFK78GU8vdEv 5bdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rW9ghUln+nVZqhSXQcEdysdrOE/j7RocHchFpF1Tr20=; b=R9XAvPA+QFbXn3SC+UVPtakpecs2Gt9bwt3UW3UgGjQ2i9+PxFLgwRHlwedSaDtoVV +H8kLp3AKraT/18nUeWoBBfb7JJERSP+gyWE9Ehxdz6q6Q+T5ut9n7jbaat0bsvsdTaN 60IHReCjpncc8QRZ+NYSNMFje7aydtohboqThjT+58IaVYWcwkiceX3WKlmsXSJqmByR XuL5TNp1VerN80nHAP3fogzKfI9dZ/j1baKr0L1/ERA3YJUqoYnvD4IZVwwNGfmhWhwF fgw15XWBKstXFq2ICgQYU63/3EmMaJ14Z50N+LsOyWy6h7p+FZ+TClgH1fr7vyfuRKPG H9mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gHzJqG7G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qc21-20020a170906d8b500b0093189a13aabsi31144017ejb.368.2023.03.29.05.41.18; Wed, 29 Mar 2023 05:41:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gHzJqG7G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229833AbjC2MgJ (ORCPT + 99 others); Wed, 29 Mar 2023 08:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbjC2MgI (ORCPT ); Wed, 29 Mar 2023 08:36:08 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B00133ABE; Wed, 29 Mar 2023 05:36:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680093364; x=1711629364; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=FpWoRE35I2ZTLQ2/dkg0MkmNNfID58WTvJw6X4novL8=; b=gHzJqG7G55GXBMaFbSwTI9J8KgNec/V1G25HbpVykUL+B9TAJ4ZhRL/g PrjpIFmhUqbmIwkJuzyWMNNBC39D6yjXoNWqvUaFofXTtpKMPM23gFP18 cQK/B/avgKVgXwDMe/pWI+bgFB39J2lSQs8R7054bvXDALqHxDWEZSkCV qVvRS91ZOQBhHwEy/6tVzffQARH9lQkW9yzbrUEipAknnDEJnx/Ka0Qhh KeZhp7qnVoRJjEdldExSEnZGkjTGvLjP8cZ750FqiuNYhH/pC9PCQHun1 YGKkL9PMmQms4TB16XLUJsgsM2icVYKmuUwcDHKmbyv0xXQZRLN+c3Gt6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="329330743" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="329330743" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 05:36:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="684249702" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="684249702" Received: from ostermam-mobl.amr.corp.intel.com (HELO intel.com) ([10.249.32.144]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 05:35:57 -0700 Date: Wed, 29 Mar 2023 14:35:32 +0200 From: Andi Shyti To: Andrzej Hajda Cc: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Chris Wilson , netdev@vger.kernel.org, Eric Dumazet , Jakub Kicinski , Dmitry Vyukov , "David S. Miller" , Andi Shyti Subject: Re: [PATCH v6 1/8] lib/ref_tracker: add unlocked leak print helper Message-ID: References: <20230224-track_gt-v6-0-0dc8601fd02f@intel.com> <20230224-track_gt-v6-1-0dc8601fd02f@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230224-track_gt-v6-1-0dc8601fd02f@intel.com> X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrzej, On Wed, Mar 29, 2023 at 09:24:12AM +0200, Andrzej Hajda wrote: > To have reliable detection of leaks, caller must be able to check under the same > lock both: tracked counter and the leaks. dir.lock is natural candidate for such > lock and unlocked print helper can be called with this lock taken. > As a bonus we can reuse this helper in ref_tracker_dir_exit. > > Signed-off-by: Andrzej Hajda Reviewed-by: Andi Shyti Thanks, Andi