linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nhat Pham <nphamcs@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 bfoster@redhat.com, Matthew Wilcox <willy@infradead.org>,
	linux-api@vger.kernel.org,  kernel-team@meta.com
Subject: Re: [PATCH v13 2/3] cachestat: implement cachestat syscall
Date: Wed, 10 May 2023 16:20:53 -0700	[thread overview]
Message-ID: <CAKEwX=NW=sHAkQQw3TPA5tK9O+MC9AwX05=Wp8DRFbRZ4w-JAg@mail.gmail.com> (raw)
In-Reply-To: <315e7ec2-169c-4c4b-93df-485380bc0852@app.fastmail.com>

On Sat, May 6, 2023 at 10:35 AM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Fri, May 5, 2023, at 22:34, Andrew Morton wrote:
> > On Thu, 4 May 2023 19:26:11 +0200 Geert Uytterhoeven
> > <geert@linux-m68k.org> wrote:
> >
> >> >  arch/x86/entry/syscalls/syscall_32.tbl |   1 +
> >> >  arch/x86/entry/syscalls/syscall_64.tbl |   1 +
> >>
> >> This should be wired up on each and every architecture.
> >> Currently we're getting
> >>
> >>     <stdin>:1567:2: warning: #warning syscall cachestat not implemented [-Wcpp]
> >>
> >> in linux-next for all the missing architectures.
> >
> > Is that wise?  We risk adding a syscall to an architecture without the
> > arch maintainers and testers even knowing about it.
> >
> > The compile-time nag is there to inform the arch maintainers that a new
> > syscall is available and that they should wire it up, run the selftest
> > and then ship the code if they're happy with the result.
>
> The usual approach is for the author of a new syscall to
> include a patch with all the architecture specific changes
> and Cc the architecture maintainers for that.
>
> Note that half the architectures get the entry from
> include/uapi/asm-generic/unistd.h, so adding it there
> does not necessarily trigger adding each maintainer
> from scripts/get_maintainer.pl.
>
> The only real risk in adding a new syscall is passing __u64
> register arguments that behave differently across
> architectures, or using pointers to data structures that
> require a compat handler on some architectures. I watch out
> for those as they get sent to me or the linux-arch list,
> and this one is fine.
>
>      Arnd

I took a stab at wiring the new syscall in this follow-up patch:

https://lore.kernel.org/lkml/20230510195806.2902878-1-nphamcs@gmail.com/

Let me know if I missed something! Review and/or suggestion
is very much appreciated.


  reply	other threads:[~2023-05-10 23:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  1:36 [PATCH v13 0/3] cachestat: a new syscall for page cache state of files Nhat Pham
2023-05-03  1:36 ` [PATCH v13 1/3] workingset: refactor LRU refault to expose refault recency check Nhat Pham
2023-05-03 14:31   ` Johannes Weiner
2023-05-03  1:36 ` [PATCH v13 2/3] cachestat: implement cachestat syscall Nhat Pham
2023-05-03 15:04   ` Johannes Weiner
2023-05-04  2:25     ` Nhat Pham
2023-05-04 17:26   ` Geert Uytterhoeven
2023-05-04 18:06     ` Nhat Pham
2023-05-05 20:34     ` Andrew Morton
2023-05-06 17:35       ` Arnd Bergmann
2023-05-10 23:20         ` Nhat Pham [this message]
2023-05-03  1:36 ` [PATCH v13 3/3] selftests: Add selftests for cachestat Nhat Pham
2023-05-03 15:22   ` Johannes Weiner
2023-05-11  3:21   ` Michael Ellerman
2023-05-11 19:33     ` Nhat Pham

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='CAKEwX=NW=sHAkQQw3TPA5tK9O+MC9AwX05=Wp8DRFbRZ4w-JAg@mail.gmail.com' \
    --to=nphamcs@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=bfoster@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=hannes@cmpxchg.org \
    --cc=kernel-team@meta.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --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).