From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FCF2C433F5 for ; Thu, 14 Apr 2022 06:55:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BBC3C6B0071; Thu, 14 Apr 2022 02:55:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B6BCA6B0073; Thu, 14 Apr 2022 02:55:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A0C7D6B0074; Thu, 14 Apr 2022 02:55:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 8E7996B0071 for ; Thu, 14 Apr 2022 02:55:41 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 50BDE60599 for ; Thu, 14 Apr 2022 06:55:41 +0000 (UTC) X-FDA: 79354574082.16.0A4548E Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by imf28.hostedemail.com (Postfix) with ESMTP id D554EC0008 for ; Thu, 14 Apr 2022 06:55:40 +0000 (UTC) Received: by mail-wr1-f46.google.com with SMTP id p18so4751475wru.5 for ; Wed, 13 Apr 2022 23:55:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=i5T2WuBIH0R0XDT0hQ5tatOdI9zhR+OTM38wDNtLi/4=; b=quhoyem2wmG5f5Pm04RZJs9nRUI+pzpefnP4f5/zV+b5jtV7aDQczTHfGbvXJAEMEa NiqZub798ga5ETHr0HoNs3d3uHVDg6BPpHDX1l4QeO8bmcz66Ud+2wKZ0YaflaKTZ4no njPa2Xr6Zfbfm+SJWe4mQRGq/7FjfH4I9Smo8Rgt0VvkE74erI8tGli7H65tbt3dIAaQ 3cZXVEopRXYvF9Alqk9IOWG+d1PtPitV9ALcZanOJ89H+CfqIGUa8HK5Am7TWZd2AmeO 1wU9Ks933V3RHbugNY6zw4BAPNsJ9lbzXl55fU72Ow7lbNuWUL65CZ7N1C1qiIXxIg8R olxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=i5T2WuBIH0R0XDT0hQ5tatOdI9zhR+OTM38wDNtLi/4=; b=uJYtHQVLCROHjVDkcFZhN+NoO2yGeKyEp9NrmZYR5fW44PSDh7vSdQl8dHAIR6/Amr MzO1cPR8hXXX7FLxb68FjkBV6x4TCZ1bbhecqQKfMm+epcAbotWPv3eHI+WxgHvQPAGy 6oeA5GMbM2ODMiZ3zVSP4vcid3EmeirboxsOJCXuIcsufC2tkrtVsdrddkXf6lrYa8L/ zICTKSX4GtZFjsCMLrYTbjpqy+nZhzAV/yQ6hytAsSneOa7MDpL7aDpSLbVxdCZVpznB vUN1XvCiMJVaj919+OeWdJXwPNkbdgv13WAVuqjCaff3/Tuy8cMAvxMjr6DLGAFQKKxU nm+A== X-Gm-Message-State: AOAM5304JIQ4+o0i8XDag1D9/+KETvOv38pYRtkiB/ls8bT9v7ryF1hg KrCUFyUwCM8LQpT58nA18Q== X-Google-Smtp-Source: ABdhPJzbwTBljyJ1F1r3r8n0KSRXdhTI46ye3xa1CTBUHMjQbYUXO389NEcVFe0SsMx02tcGpt+OCQ== X-Received: by 2002:a05:6000:1c8:b0:207:af9e:a4ec with SMTP id t8-20020a05600001c800b00207af9ea4ecmr915277wrx.9.1649919339489; Wed, 13 Apr 2022 23:55:39 -0700 (PDT) Received: from localhost.localdomain ([46.53.249.105]) by smtp.gmail.com with ESMTPSA id p8-20020a5d59a8000000b00207b99923d0sm990376wrr.20.2022.04.13.23.55.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 23:55:38 -0700 (PDT) Date: Thu, 14 Apr 2022 09:55:36 +0300 From: Alexey Dobriyan To: Matthew Wilcox Cc: Andrew Morton , "Alex Xu (Hello71)" , Daniel Colascione , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vlastimil Babka Subject: Re: [PATCH] mm/smaps_rollup: return empty file for kthreads instead of ESRCH Message-ID: References: <20220413211357.26938-1-alex_y_xu.ref@yahoo.ca> <20220413211357.26938-1-alex_y_xu@yahoo.ca> <20220413142748.a5796e31e567a6205c850ae7@linux-foundation.org> <1649886492.rqei1nn3vm.none@localhost> <20220413160613.385269bf45a9ebb2f7223ca8@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: D554EC0008 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=quhoyem2; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf28.hostedemail.com: domain of adobriyan@gmail.com designates 209.85.221.46 as permitted sender) smtp.mailfrom=adobriyan@gmail.com X-Stat-Signature: 5y83e7tbdzmhakhnuobe1gjm8zm4oi94 X-HE-Tag: 1649919340-928478 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 14, 2022 at 04:23:13AM +0100, Matthew Wilcox wrote: > On Wed, Apr 13, 2022 at 04:06:13PM -0700, Andrew Morton wrote: > > On Wed, 13 Apr 2022 18:25:53 -0400 "Alex Xu (Hello71)" wrote: > > > > 258f669e7e88 was 4 years ago, so I guess a -stable backport isn't > > > > really needed. > > > > > > Current behavior (4.19+): > [...] > > > Pre-4.19 and post-patch behavior: > > > > I don't think this will work very well. smaps_rollup is the sort of > > system tuning thing for which organizations will develop in-house > > tooling which never get relesaed externally. > > > > > 3. As mentioned previously, this was already the behavior between 4.14 > > > and 4.18 (inclusive). > > > > > > > Yup. Hm, tricky. I'd prefer to leave it alone if possible. How > > serious a problem is this, really? > > I don't think "It's been like this for four years" is as solid an argument > as you might like. Certain distributions (of the coloured millinery > variety, for example) haven't updated their kernel since then and so > there may well be many organisations who have not been exposed to the > current behaviour. Even my employers distribution, while it offers a > 5.4 based kernel, still has many customers who have not moved from the > 4.14 kernel. Inertia is a real thing, and restoring this older behaviour > might well be an improvement. Returning ESRCH is better so that programs don't waste time reading and closing empty files and instantiating useless inodes. Of course it is different if this patch was sent as response to a regression.