Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2328629rwr; Fri, 21 Apr 2023 07:30:22 -0700 (PDT) X-Google-Smtp-Source: AKy350YYRmoikl5gym9xw+TbfQMy37tn/qkbpGnhu3l6sC3Sg+zkk9hd2vAXhWCFZhMStclmQ6cm X-Received: by 2002:a17:902:e852:b0:1a9:4b42:a5a2 with SMTP id t18-20020a170902e85200b001a94b42a5a2mr2164784plg.0.1682087422598; Fri, 21 Apr 2023 07:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682087422; cv=none; d=google.com; s=arc-20160816; b=ycFG841CQvq6Da+uY1ow5+QxJ1unkpP1Y3M5jdyGJCTWuP1D2fxtr5scED02q579Mt zmNkqGe/HdK8hsUeYks1JrYbpVx7IQce2w915kfbwo+jAcK9/Rqu9UiwzZn2kcAMjC6t l+qh9i6mvOJf4OfQsYP/sM8yC2fPAIG15/KPS8pgSw+wIXADJvD4MoB9it5g6fdbHVRN SX/8Zy9Cv6qSopmXzcPBKL/d9XEU6Db+10ekoG7dSYPEpboanLbOobS6HhMmLyM7eWxn 0pkfKmp1MiS8xtc043ezYIGQnPPC7rjbneGCpmfURbM1IdBiK9MAUonWJg4RYXBfuEv7 OFjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Fev/HjWH2B8yyfQiDGZ9D/O2oZYyJ9gGuApag0ZRVwc=; b=wN0Evn1txQLdkgaYhOjim3Wy0N2QHefZ6WkWifnvEQRmK7GZaMOer1Haxf7PAmseZd kgyMO0SqM+0PCqs6mDV6tfXibhapfDt5wgYInINBuYt7Kx2zoASsyTmmZ6K5yv494hDZ vWJNC2VPJTyAxTqBlX0SuFu7s5CxUrwbSQjWBNsJdgJ6viS2meZkj2iW2gl9+3znduj1 wp/kEYEk00uywfjG4hOpmyE9e8T88/DktxRQMcVrre2L1wXjrdmgIKzQVmpTt2gwAKIU /T4nzyDXY1WfhGZZooJa29BqohWu8FJ3/PTL5tYY3HrVkW5VJQQSBGt73nhhs92d7Ab0 OEWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=TVGpX8Rs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oc14-20020a17090b1c0e00b0024695095bb3si7357475pjb.189.2023.04.21.07.30.07; Fri, 21 Apr 2023 07:30:22 -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=@google.com header.s=20221208 header.b=TVGpX8Rs; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232299AbjDUOZA (ORCPT + 99 others); Fri, 21 Apr 2023 10:25:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232555AbjDUOY7 (ORCPT ); Fri, 21 Apr 2023 10:24:59 -0400 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D7671705 for ; Fri, 21 Apr 2023 07:24:58 -0700 (PDT) Received: by mail-il1-x131.google.com with SMTP id e9e14a558f8ab-329577952c5so693945ab.1 for ; Fri, 21 Apr 2023 07:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682087098; x=1684679098; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Fev/HjWH2B8yyfQiDGZ9D/O2oZYyJ9gGuApag0ZRVwc=; b=TVGpX8Rsft5hzMr9h6Hwyheu0HJYGuHxxs7ojc6Kil4QcUiO/DlWT0in/uLxRo6Cjj k1VQcRlDqVO4SIIb5IVwDa4JdfL4zYLvXGhLV/kB+NM5PH/u+XjBKfnkjEQ9QVQmK60w Vc8FzK6DfY5mi2TbK4uHxCC49bYsU4nxKZJdASBm+oks7LbQ+RxB90HBUI6mYlegxr7U 1XR6A+LHNGRyTDAhBVssIxGbpCl6otjWPglcnEPEXNFs1XXpb+XtVA4I/tlXGMqxR+pq 8D4T4nbhmC3rl/qw+IT0JwOuDIGlL0G4YOWFtTiFq80UoDYKM6UOS6EJnHjngA/3Jjn6 mLOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682087098; x=1684679098; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Fev/HjWH2B8yyfQiDGZ9D/O2oZYyJ9gGuApag0ZRVwc=; b=XpP08QL+bEjaYoG42dyaog7OfGLsqCRt/gf8Fff58+AfeRgweuq/Tb6VGGsvzqfZxt 6dt7qkrYPoI66bn+5ysQ/G8jKMjIJc+fcW7UppwNCyaxBhtnGDVLldbOqzg6P01CS6ZB Ii1BFcWXPceXzHTCVBwh0wjHvDDiep2eWQlSsnzjHrJfLBp4LRN4bqw+Aad4+818oRQb Jta4NqjTlZBLYHoyEuw0w2E+65/vxip4LpH17IVNFhcS73RL/fwNFl0FPj/VPNpm54ix F/uZAy/gO2VHCo251jJo+ceslUvhgAUTPUQGldZtpNRp/pK6l3wbI+TA9qApmEApZZC1 HLzw== X-Gm-Message-State: AAQBX9dXLE42kNFRxhKh5emGZdU07SUdTXBCGy2f5b/vz4csSLdokP+j wTmeiS6p/DNhAEmtzIYgoZ7knfTP7lPX/+JDFtEAiA== X-Received: by 2002:a05:6e02:1a22:b0:32a:b8fd:19be with SMTP id g2-20020a056e021a2200b0032ab8fd19bemr279553ile.18.1682087097600; Fri, 21 Apr 2023 07:24:57 -0700 (PDT) MIME-Version: 1.0 References: <20230224-track_gt-v7-0-11f08358c1ec@intel.com> <20230224-track_gt-v7-1-11f08358c1ec@intel.com> In-Reply-To: <20230224-track_gt-v7-1-11f08358c1ec@intel.com> From: Eric Dumazet Date: Fri, 21 Apr 2023 16:24:43 +0200 Message-ID: Subject: Re: [PATCH v7 1/7] lib/ref_tracker: add unlocked leak print helper 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, Jakub Kicinski , Dmitry Vyukov , "David S. Miller" , Andi Shyti Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 On Fri, Apr 21, 2023 at 1:35=E2=80=AFPM Andrzej Hajda wrote: > > To have reliable detection of leaks, caller must be able to check under t= he same > lock both: tracked counter and the leaks. dir.lock is natural candidate f= or 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 > --- SGTM, thanks. Reviewed-by: Eric Dumazet