Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7947779pxb; Fri, 19 Feb 2021 03:38:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAwXY4ldLc3sL+WTBEEHFTebKTb9tbNEtXNSp9ky13vCq7gH+uKQeWDunhW8L2cc/o0aXx X-Received: by 2002:a17:906:28cc:: with SMTP id p12mr8614561ejd.426.1613734736630; Fri, 19 Feb 2021 03:38:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613734736; cv=none; d=google.com; s=arc-20160816; b=XGk4jDhB7lAR/mPz3uO+X9ZRQgwK+rYR6xDyKU4Jx+G/IUf7FZIY4CHdBAg4lzwifR qCCOIw6WicXw6NwKVSeKUFyqZP/YKFckGFZc5c4o97IC6OO7/nqihNZ9dbk9Ik48gsKt aCMmaRyGiBP0jihrsIWQ3Ys3evEy7byATSAyVzoX/yKyuFFUxgULeuLpp55SXSZCFDIa 8mGYgcDwS2h4LZ0BjZ2Cv7l67sepqyLvRA6t3eI9AYt0DPqEnuo+l5BooArX72WOdSNx f1MypU4F7jpnEe2fH9OIq4q9wsIfVShPAdM+6exLJwqLQjYNglFaefQw+hp6Cwwq+0+a S3Mg== 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=8iB+VaRxs/Vd+iO4NOc30yFNwI5s0yt0D3pz7h5hjOY=; b=dgwd7mpubRtNMNxv3SO4cKqvfTSy436ieZUIWC71qxeF5Jiedax/XjjYra2VzhXK+q tSZSs0TU7CuUXYbfLr7L47dzMdQorcIa2YGxNDKi31Jb0to6B7O7+4bi/YPs3tCyE9wK w4sWBRq8fASNXqx+mlA2H+8BpGMI2SwvjQ9jEPFsGhuUqUKc6uyZiuS+YWkmWOVCEcAv ss/OcU+g2/sklpRawPAbyCe/45wliDZzsC5Sgay1sgmL1SZ5U/BQCO3iOBNSNUQvtr8x EzL9O+ERmuYMxASmOXZHudfavshTyPfdDnqu2N+NOj80aGaRUjvOa/W99CHPgp3aQZqi D12Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JXQB7A65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m13si6044056edi.144.2021.02.19.03.38.31; Fri, 19 Feb 2021 03:38:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=JXQB7A65; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230194AbhBSLhq (ORCPT + 99 others); Fri, 19 Feb 2021 06:37:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:36570 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbhBSLhp (ORCPT ); Fri, 19 Feb 2021 06:37:45 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0675664E86; Fri, 19 Feb 2021 11:37:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1613734624; bh=gHEQU1XxqU4aw2PyVE3yrc+QG1v7YGb4x9pQeqe0F+Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JXQB7A65neqXQ3sM1T3YsTZM4QChDAjvr2nqf/1kftUrVdxQaRwvMaSITtStOJvGL qjvL66DXk1056QyauvNYqcXA7+pmZ5ZuaQz5wCIHT7YkcHL6Gp6A8ZiVbpUeakrYBr 1/LZJgURpodH5eJgCwKHzXtGY6zvEsEEvzxqVs3y2enHn1gbbxNSPcXVGejwlNU1kZ bz0c7d0lMmfz14xOMWXVAesCeMHoGbGdIIrXVfk4p7M4KXxZC7Ng60ErFTs3qjjtSV FShhDl9/Sqkgaa+T5WC7hrhQIaY4oDDmAZ8lH5KQKNzrDrAKowgMnlKkVuCYS7tuuI rC5T+1MpYcS0A== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id D672F40CD9; Fri, 19 Feb 2021 08:37:00 -0300 (-03) Date: Fri, 19 Feb 2021 08:37:00 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Jiri Olsa , Ingo Molnar , Peter Zijlstra , Mark Rutland , Alexander Shishkin , LKML , Stephane Eranian , Ian Rogers , Andi Kleen Subject: Re: [PATCH 3/3] tools/lib/fs: Cache cgroupfs mount point Message-ID: References: <20201216090556.813996-1-namhyung@kernel.org> <20201216090556.813996-3-namhyung@kernel.org> <20201229115158.GH521329@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Fri, Feb 19, 2021 at 07:05:59PM +0900, Namhyung Kim escreveu: > On Wed, Feb 17, 2021 at 9:58 PM Arnaldo Carvalho de Melo wrote: > > Em Fri, Jan 08, 2021 at 02:51:44PM +0900, Namhyung Kim escreveu: > > > On Wed, Jan 6, 2021 at 10:33 AM Namhyung Kim wrote: > > > As you said, I think mostly we don't care as the accesses will happen > > > in a short period of time. But if you really care, maybe for the upcoming > > > perf daemon changes, I think we can add an API to invalidate the cache > > > or internal time-based invalidation logic (like remove it after 10 sec.). > > Ok, we can have something in 'perf daemon' to periodically invalidate > > this, maybe do a poor man inotify and when asking for the cgroup > > mountpoint, check some characteristic of that file that changes when it > > is modified, or plain use a timestamp and have some threshold. > I thought about this again. > We don't directly access the cgroups in the perf daemon. It just > creates new record processes so they'll see a new mountpoint whenever > they started since this cache is shared within the process only. > That means we don't need to care about the invalidate in the daemon > but each perf record and perf stat should do it when they are required > to do the work repeatedly. > But looking at the code, the cgroup is set during event parsing (-G > option) or early in the command (--for-each-cgroup option). So cgroup > info would not be changed even if the command runs repeatedly. > So I think you can take the patch as is. Its in perf/core branch on its way to Linus soon :-) Thanks for checking it. - Arnaldo