From: Andrew Morton <akpm@linux-foundation.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
"Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>,
Daniel Colascione <dancol@google.com>,
linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/smaps_rollup: return empty file for kthreads instead of ESRCH
Date: Wed, 27 Apr 2022 13:34:20 -0700 [thread overview]
Message-ID: <20220427133420.2847e62203b9e10a106c86b2@linux-foundation.org> (raw)
In-Reply-To: <83f49beb-52f7-15f6-3b53-97cac0030ca4@suse.cz>
On Thu, 14 Apr 2022 09:38:14 +0200 Vlastimil Babka <vbabka@suse.cz> wrote:
> > Returning ESRCH is better so that programs don't waste time reading and
> > closing empty files and instantiating useless inodes.
>
> Hm, unfortunately I don't remember why I put return -ESRCH for this case in
> addition to get_proc_task() failing. I doubt it was a conscious decision to
> treat kthreads differently - I think I would have preferred consistency with
> maps/smaps.
>
> Can the awk use case be fixed with some flag to make it ignore the errors?
This is all too hard. I think I'll drop the patch for now.
next prev parent reply other threads:[~2022-04-27 20:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220413211357.26938-1-alex_y_xu.ref@yahoo.ca>
2022-04-13 21:13 ` [PATCH] mm/smaps_rollup: return empty file for kthreads instead of ESRCH Alex Xu (Hello71)
2022-04-13 21:27 ` Andrew Morton
2022-04-13 22:25 ` Alex Xu (Hello71)
2022-04-13 23:06 ` Andrew Morton
2022-04-14 3:23 ` Matthew Wilcox
2022-04-14 6:55 ` Alexey Dobriyan
2022-04-14 7:38 ` Vlastimil Babka
2022-04-27 20:34 ` Andrew Morton [this message]
2022-04-14 15:24 ` Alex Xu (Hello71)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220427133420.2847e62203b9e10a106c86b2@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=alex_y_xu@yahoo.ca \
--cc=dancol@google.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).