Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp804355imi; Fri, 22 Jul 2022 09:49:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ubP58NWbj8pvp14OPphP4g7JnjBzU7qkMtakuZTAsfWWypNSJpXh66Rvj0E2PA/5ZmL+AW X-Received: by 2002:a05:6808:1706:b0:335:1715:f33e with SMTP id bc6-20020a056808170600b003351715f33emr7325858oib.174.1658508591318; Fri, 22 Jul 2022 09:49:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658508591; cv=none; d=google.com; s=arc-20160816; b=LVcryedblaaGwrQFl3N+CE0QDBSFpXrusVTDLfP9KO0+P2yMkp+EZBVo+ic1j5VoR1 BJX19wmhP4CGPpP2xEDfswblTyWlu+11vADpYe2iiwj6vrDFe+lYRE73C6iVTHzR36QZ O7trTVUlfGhIPHKE6f3bi3apHM+Gb5hvx3vsCkXHEBkt64K2/w4jti904gQF7MiW3sX9 XWQdRxeCoJ3tD5MW9/4QDTtA0eDyn3YPyOEF5MlMP2k6yPkrhDVOSUPVuXluKXtW8c9t kRdT7Xyfsu6h6jdQloBD3h+Uu2na2sF8HJPeBFN+lxHPI7xxy3zQmzZ9jm6ZbbZEVrpO DkCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=V2UoXTUSj0dESjqSV1KCC5OtChDJT+2FH7hAqN0NUfY=; b=nQldTap4BvpQ8vmsm7v+R2wdsQ+2iDrHQVDPGT67s349rtDGZ0UPtN1RSx4+Un8A7w xY4I9VlYInH0gJ/drzD1Esjh/Q6u5EZmR7YScDAofhsMJzWA9ihyluhzKIJ4c/Ecwgek CwLSnfQ/2pt7AxfOgpm6Of9a2MOVmjzaB1DpzAp0Z/Vp142r8CE3wLxt4oIVed+h5uTK HMjdANWT6FF9Y47KxdM4MQpp15sT6rpZdd+C/R8Lg5SKL2i/uelEetNbGHlpBrf7aRiB eXmt9/BZqpIV2QwAdVvcERzdQB4MjO6VN8NyFjxEt0eaEQ1idUs31UzMoLzPBShCywza U/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=X9H3p2X2; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v29-20020a056870709d00b000f2e7b8dbebsi3976945oae.14.2022.07.22.09.49.34; Fri, 22 Jul 2022 09:49:51 -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=@infradead.org header.s=bombadil.20210309 header.b=X9H3p2X2; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235585AbiGVQIq (ORCPT + 99 others); Fri, 22 Jul 2022 12:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235591AbiGVQIm (ORCPT ); Fri, 22 Jul 2022 12:08:42 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6024852442; Fri, 22 Jul 2022 09:08:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=V2UoXTUSj0dESjqSV1KCC5OtChDJT+2FH7hAqN0NUfY=; b=X9H3p2X2OxIbk8g/M87b2fgAu/ 05fxzWTKDKTqDSqe4u2sca5fPq6Wbn3bPn4TR3rG4tAHu5lXRBhnwCwvLSkn9a/TRw5nEsf6kVZbI BA5lY9VhNNICsPSsOaGZDfRfP8aYoOfEi4h26SGWiE3jc/qjUFk40QtT/3h3+jebBjqvy66sYPyCJ Bmyr32Dl7PcHkfzsLH58JteZ1/QmS3mHFulve24d0dpYcR4d9SzNiDXxXIMVsfcUbvCJqK2oIofUy 29lPcJ+Q87JzC8ht4Xxq/AeoKQg82mNbTDIeSfDUif5QlgOVYMCNZFvUZwLjf3l0eW3G5PaJG39p2 NmldI7pg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oEvCa-007lqa-Pu; Fri, 22 Jul 2022 16:08:32 +0000 Date: Fri, 22 Jul 2022 09:08:32 -0700 From: Luis Chamberlain To: Muchun Song Cc: Zhang Yuchen , "Eric W. Biederman" , Linus Torvalds , David Howells , Deepa Dinamani , Christoph Hellwig , linux-api@vger.kernel.org, Kees Cook , Iurii Zaikin , LKML , linux-fsdevel Subject: Re: [RFC] proc: fix create timestamp of files in proc Message-ID: References: <20220721081617.36103-1-zhangyuchen.lcr@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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, Jul 22, 2022 at 11:43:49AM +0800, Muchun Song wrote: > On Fri, Jul 22, 2022 at 12:16 AM Luis Chamberlain wrote: > > On Thu, Jul 21, 2022 at 04:16:17PM +0800, Zhang Yuchen wrote: > > > The file timestamp in procfs is the timestamp when the inode was > > > created. If the inode of a file in procfs is reclaimed, the inode > > > will be recreated when it is opened again, and the timestamp will > > > be changed to the time when it was recreated. > > > > The commit log above starts off with a report of the directory > > of a PID. When does the directory of a PID change dates when its > > respective start_time does not? When does this reclaim happen exactly? > > Under what situation? > > IMHO, when the system is under memory pressure, then the proc > inode can be reclaimed, it is also true when we `echo 3 > > /proc/sys/vm/drop_caches`. After this operation, the proc inode's > timestamp is changed. Good point. > Maybe the users think the timestamp of /proc/$pid directory is equal to > the start_time of a process, I think it is because of a comment of > shortage about the meaning of the timestamp of /proc files. I'll send a documentation enhancement for this. Thanks for helping with improving the quality of your peer's patches / feedback in the future! Luis