All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org>,
	Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>,
	Jonathan Corbet <corbet-T1hC0tSOHrs@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Andy Lutomirski <luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org>,
	Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	Linus Torvalds
	<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC PATCH v6] Documentation/arch: Add Documentation/arch-features.txt
Date: Thu, 14 May 2015 12:02:29 +0200	[thread overview]
Message-ID: <20150514100229.GA24432@gmail.com> (raw)
In-Reply-To: <20150513150523.ddd65d7cd51f820b78f0c8e3-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>


* Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:

> On Wed, 13 May 2015 09:27:57 -0700 Josh Triplett <josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org> wrote:
> 
> > If we can't generate this, then the ASCII-art style and right-aligned
> > feature names seems *really* likely to produce spurious conflicts,
> > especially when adding a feature to the list.  Even though it would
> > produce a much longer file, would you consider dropping the tables and
> > just having a section per feature?
> 
> me2.  The patch conflicts are going to be pretty bad.
> 
> I'd also prefer a format which allows us to add useful notes - it's 
> a bit hostile to say "thou shalt implement X" without providing any 
> info about how to do so.  Where do we tell maintainers that there's 
> a handy test app in tools/testing/selftests which they should use?
> 
> This way, I can bug patch submitters with "hey, you forgot to update 
> Documentation/arch-features.txt" and they will add useful info while 
> it's all still hot in their minds.

Ok, agreed, I've solved these problems by creating a per feature 
broken out directory hieararchy, see my next patch submission.

> And there's a ton of stuff which can go in here, much of it not
> immediately apparent.

Yes.

> Just grepping 9 months worth of the stuff I've handled, I'm seeing
> things like
> 
> HAVE_ARCH_KASAN

Ok, added.

> __HAVE_ARCH_PMDP_SPLITTING_FLUSH

Ok, added.

> __HAVE_ARCH_PTE_SPECIAL

Ok, added.

> __HAVE_ARCH_GATE_AREA

So this does not appear to be a feature per se: architectures that 
don't define __HAVE_ARCH_GATE_AREA fall back to the generic one. Or is 
it expected for every architecture to provide its own?

> ARCH_HAVE_ELF_ASLR

Does not seem to be upstream.

> ARCH_HAS_GCOV_PROFILE_ALL

Yeah, that's already included in v6.

> CONFIG_ARCH_USE_BUILTIN_BSWAP

So AFAICS this feature is an arch opt-in, on the basis of whether GCC 
does the right thing or not.

We'd need a separate config switch: ARCH_DONT_USE_BUILTIN_BSWAP to 
make a distinction between architectures that have made an informed 
decision to not support it, versus architectures that have not 
bothered so far.

> HAVE_ARCH_HUGE_VMAP

Ok, added.

> ARCH_HAS_SG_CHAIN

Ok, added.

> __HAVE_ARCH_STRNCASECMP

So, no architecture supports this yet- but added.

> ARCH_HAS_ELF_RANDOMIZE

Agreed and v6 already includes this.

> CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID

So this isn't really a feature, but a facility that an architecture 
might have to provide if it has a quirk. Only ia64 has that at the 
moment.

> ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT

Not upstream yet it appears.

> CONFIG_ARCH_USES_PG_UNCACHED

Ok, added.

> CONFIG_ARCH_HAS_WALK_MEMORY

So this too is a quirk, for PowerPC, which does not maintain the 
memory layout in the resource tree.

> and things which don't contain ARCH
> 
> HAVE_GENERIC_RCU_GUP

So this is a generic, RCU based fast-GUP facility - but architectures 
may implement their own get_user_pages_fast() facilites, such as x86 
which does it lock-less.

So I'm not sure what to flag here: perhaps architectures that don't 
offer get_user_pages_fast() at all?

> HAVE_RCU_TABLE_FREE

So this is related to HAVE_GENERIC_RCU_GUP: architectures that do RCU 
based GUP will want to use HAVE_RCU_TABLE_FREE.

> HAVE_GENERIC_RCU_GUP

double ;-)

> CONFIG_HAVE_CLK

So I think the generic clock framework first needs to be integrated 
with core timekeeping before we start requiring it from architectures.

> CONFIG_HAVE_IOREMAP_PROT

Agreed - already in -v6.

> CONFIG_HAVE_MEMBLOCK_NODE_MAP

Ok, added.

> And then there's the increasingly common
> 
> arch/include/asm/foo.h:
> 
> 	static inline void wibble(...)
> 	{
> 		...
> 	}
> 	#define wibble wibble
> 
> include/linux/foo.h:
> 
> 	#ifndef wibble
> 	static inline void wibble(...)
> 	{
> 		...
> 	}
> 	#define wibble
> 	#endif
> 
> which is going to be hard to grep for....

Hm, yes. If you give me a rough list then I can try to map them out as 
well.

Once we have the initial feature collection done it will be a lot 
easier going forward: anything missing or inaccurate can be added to 
or fixed in its own file.

> ugh, this thing's going to be enormous.  People will go insane 
> reading it, so each section should have a sentence describing what 
> the feature does so maintainers can make quick decisions about 
> whether they should bother.

I hope you'll like the structure of -v7 better :-)

Thanks,

	Ingo

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Borislav Petkov <bp@alien8.de>, Jonathan Corbet <corbet@lwn.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@amacapital.net>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
	x86@kernel.org, linux-arch@vger.kernel.org
Subject: Re: [RFC PATCH v6] Documentation/arch: Add Documentation/arch-features.txt
Date: Thu, 14 May 2015 12:02:29 +0200	[thread overview]
Message-ID: <20150514100229.GA24432@gmail.com> (raw)
Message-ID: <20150514100229.lpL6T9ghOIfjMGJ71D6UiHE7p972boBVB4itKKswMlw@z> (raw)
In-Reply-To: <20150513150523.ddd65d7cd51f820b78f0c8e3@linux-foundation.org>


* Andrew Morton <akpm@linux-foundation.org> wrote:

> On Wed, 13 May 2015 09:27:57 -0700 Josh Triplett <josh@joshtriplett.org> wrote:
> 
> > If we can't generate this, then the ASCII-art style and right-aligned
> > feature names seems *really* likely to produce spurious conflicts,
> > especially when adding a feature to the list.  Even though it would
> > produce a much longer file, would you consider dropping the tables and
> > just having a section per feature?
> 
> me2.  The patch conflicts are going to be pretty bad.
> 
> I'd also prefer a format which allows us to add useful notes - it's 
> a bit hostile to say "thou shalt implement X" without providing any 
> info about how to do so.  Where do we tell maintainers that there's 
> a handy test app in tools/testing/selftests which they should use?
> 
> This way, I can bug patch submitters with "hey, you forgot to update 
> Documentation/arch-features.txt" and they will add useful info while 
> it's all still hot in their minds.

Ok, agreed, I've solved these problems by creating a per feature 
broken out directory hieararchy, see my next patch submission.

> And there's a ton of stuff which can go in here, much of it not
> immediately apparent.

Yes.

> Just grepping 9 months worth of the stuff I've handled, I'm seeing
> things like
> 
> HAVE_ARCH_KASAN

Ok, added.

> __HAVE_ARCH_PMDP_SPLITTING_FLUSH

Ok, added.

> __HAVE_ARCH_PTE_SPECIAL

Ok, added.

> __HAVE_ARCH_GATE_AREA

So this does not appear to be a feature per se: architectures that 
don't define __HAVE_ARCH_GATE_AREA fall back to the generic one. Or is 
it expected for every architecture to provide its own?

> ARCH_HAVE_ELF_ASLR

Does not seem to be upstream.

> ARCH_HAS_GCOV_PROFILE_ALL

Yeah, that's already included in v6.

> CONFIG_ARCH_USE_BUILTIN_BSWAP

So AFAICS this feature is an arch opt-in, on the basis of whether GCC 
does the right thing or not.

We'd need a separate config switch: ARCH_DONT_USE_BUILTIN_BSWAP to 
make a distinction between architectures that have made an informed 
decision to not support it, versus architectures that have not 
bothered so far.

> HAVE_ARCH_HUGE_VMAP

Ok, added.

> ARCH_HAS_SG_CHAIN

Ok, added.

> __HAVE_ARCH_STRNCASECMP

So, no architecture supports this yet- but added.

> ARCH_HAS_ELF_RANDOMIZE

Agreed and v6 already includes this.

> CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID

So this isn't really a feature, but a facility that an architecture 
might have to provide if it has a quirk. Only ia64 has that at the 
moment.

> ARCH_SUPPORTS_DEFERRED_STRUCT_PAGE_INIT

Not upstream yet it appears.

> CONFIG_ARCH_USES_PG_UNCACHED

Ok, added.

> CONFIG_ARCH_HAS_WALK_MEMORY

So this too is a quirk, for PowerPC, which does not maintain the 
memory layout in the resource tree.

> and things which don't contain ARCH
> 
> HAVE_GENERIC_RCU_GUP

So this is a generic, RCU based fast-GUP facility - but architectures 
may implement their own get_user_pages_fast() facilites, such as x86 
which does it lock-less.

So I'm not sure what to flag here: perhaps architectures that don't 
offer get_user_pages_fast() at all?

> HAVE_RCU_TABLE_FREE

So this is related to HAVE_GENERIC_RCU_GUP: architectures that do RCU 
based GUP will want to use HAVE_RCU_TABLE_FREE.

> HAVE_GENERIC_RCU_GUP

double ;-)

> CONFIG_HAVE_CLK

So I think the generic clock framework first needs to be integrated 
with core timekeeping before we start requiring it from architectures.

> CONFIG_HAVE_IOREMAP_PROT

Agreed - already in -v6.

> CONFIG_HAVE_MEMBLOCK_NODE_MAP

Ok, added.

> And then there's the increasingly common
> 
> arch/include/asm/foo.h:
> 
> 	static inline void wibble(...)
> 	{
> 		...
> 	}
> 	#define wibble wibble
> 
> include/linux/foo.h:
> 
> 	#ifndef wibble
> 	static inline void wibble(...)
> 	{
> 		...
> 	}
> 	#define wibble
> 	#endif
> 
> which is going to be hard to grep for....

Hm, yes. If you give me a rough list then I can try to map them out as 
well.

Once we have the initial feature collection done it will be a lot 
easier going forward: anything missing or inaccurate can be added to 
or fixed in its own file.

> ugh, this thing's going to be enormous.  People will go insane 
> reading it, so each section should have a sentence describing what 
> the feature does so maintainers can make quick decisions about 
> whether they should bother.

I hope you'll like the structure of -v7 better :-)

Thanks,

	Ingo

  parent reply	other threads:[~2015-05-14 10:02 UTC|newest]

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 19:29 [PATCHv2 1/2] clone: Support passing tls argument via C rather than pt_regs magic Josh Triplett
2015-05-11 19:29 ` Josh Triplett
2015-05-12 21:22 ` Andrew Morton
2015-05-12 21:38   ` Peter Zijlstra
     [not found]     ` <20150512213843.GV21418-ndre7Fmf5hadTX5a5knrm8zTDFooKrT+cvkQGrU6aU0@public.gmane.org>
2015-05-12 21:49       ` Andrew Morton
2015-05-12 21:49         ` Andrew Morton
     [not found]         ` <20150512144910.0b49c9a7a13336773449db33-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-05-13  8:34           ` [RFC PATCH] Documentation/arch: Add Documentation/arch-TODO Ingo Molnar
2015-05-13  8:34             ` Ingo Molnar
2015-05-13  8:34             ` Ingo Molnar
2015-05-13  8:34             ` Ingo Molnar
2015-05-13  8:56             ` [RFC PATCH v2] " Ingo Molnar
2015-05-13  8:56               ` Ingo Molnar
2015-05-13  8:56               ` Ingo Molnar
     [not found]               ` <20150513085636.GA11030-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13  9:24                 ` [RFC PATCH v3] " Ingo Molnar
2015-05-13  9:24                   ` Ingo Molnar
2015-05-13  9:24                   ` Ingo Molnar
2015-05-13  9:24                   ` Ingo Molnar
2015-05-13  9:46                   ` Ingo Molnar
2015-05-13  9:46                     ` Ingo Molnar
2015-05-13  9:46                     ` Ingo Molnar
     [not found]                     ` <20150513094622.GC11030-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13  9:47                       ` [RFC PATCH v5] " Ingo Molnar
2015-05-13  9:47                         ` Ingo Molnar
2015-05-13  9:47                         ` Ingo Molnar
2015-05-13  9:47                         ` Ingo Molnar
2015-05-13 13:18                         ` Borislav Petkov
     [not found]                           ` <20150513131835.GJ1517-fF5Pk5pvG8Y@public.gmane.org>
2015-05-13 13:48                             ` [RFC PATCH v6] Documentation/arch: Add Documentation/arch-features.txt Ingo Molnar
2015-05-13 13:48                               ` Ingo Molnar
2015-05-13 13:48                               ` Ingo Molnar
2015-05-13 13:48                               ` Ingo Molnar
2015-05-13 16:27                               ` Josh Triplett
2015-05-13 16:53                                 ` Josh Triplett
2015-05-13 16:53                                   ` Josh Triplett
2015-05-14 10:16                                   ` Ingo Molnar
     [not found]                                     ` <20150514101615.GB27550-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-14 10:31                                       ` Josh Triplett
2015-05-14 10:31                                         ` Josh Triplett
2015-05-13 22:05                                 ` Andrew Morton
2015-05-13 22:05                                   ` Andrew Morton
     [not found]                                   ` <20150513150523.ddd65d7cd51f820b78f0c8e3-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-05-14 10:02                                     ` Ingo Molnar [this message]
2015-05-14 10:02                                       ` Ingo Molnar
2015-05-14 10:15                                     ` [PATCH] Documentation/arch: Add kernel feature descriptions and arch support status under Documentation/features/ Ingo Molnar
2015-05-14 10:15                                       ` Ingo Molnar
     [not found]                                       ` <20150514101518.GA27550-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-14 10:35                                         ` [PATCH v2] " Ingo Molnar
2015-05-14 10:35                                           ` Ingo Molnar
2015-05-14 19:38                                           ` Andrew Morton
2015-05-14 19:59                                             ` Ingo Molnar
     [not found]                                               ` <20150514195925.GA27570-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-14 22:33                                                 ` Stephen Rothwell
2015-05-14 22:33                                                   ` Stephen Rothwell
     [not found]                                                   ` <20150515083334.535ad43e-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
2015-05-15  7:38                                                     ` Ingo Molnar
2015-05-15  7:38                                                       ` Ingo Molnar
     [not found]                                                       ` <20150515073805.GA14993-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-15  7:51                                                         ` Ingo Molnar
2015-05-15  7:51                                                           ` Ingo Molnar
2015-05-15  9:37                                               ` Ingo Molnar
     [not found]                                             ` <20150514123835.1bf436bc35d711f8dbf9bc0f-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-05-14 20:34                                               ` Richard Weinberger
2015-05-14 20:34                                                 ` Richard Weinberger
2015-05-14 22:57                                               ` Michael Ellerman
2015-05-14 22:57                                                 ` Michael Ellerman
     [not found]                                                 ` <1431644248.2981.1.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-05-15  7:49                                                   ` Ingo Molnar
2015-05-15  7:49                                                     ` Ingo Molnar
2015-05-18  1:37                                                     ` Michael Ellerman
     [not found]                                                       ` <1431913033.13218.2.camel-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>
2015-05-18  8:54                                                         ` Ingo Molnar
2015-05-18  8:54                                                           ` Ingo Molnar
     [not found]                                                           ` <20150518085423.GA24944-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-19  2:02                                                             ` Michael Ellerman
2015-05-19  2:02                                                               ` Michael Ellerman
     [not found]                                           ` <20150514103544.GA7027-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-22 15:49                                             ` Jonathan Corbet
2015-05-22 15:49                                               ` Jonathan Corbet
     [not found]                                               ` <20150522094931.78a43421-T1hC0tSOHrs@public.gmane.org>
2015-05-23  8:07                                                 ` Ingo Molnar
2015-05-23  8:07                                                   ` Ingo Molnar
2015-05-24 18:44                                                   ` Jonathan Corbet
     [not found]                                                     ` <20150524124447.0c395540-T1hC0tSOHrs@public.gmane.org>
2015-06-03 11:03                                                       ` [GIT PULL] Documentation/features: Add kernel feature descriptions and arch support status files " Ingo Molnar
2015-06-03 11:03                                                         ` Ingo Molnar
     [not found]                                                         ` <20150603110355.GA12079-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-06-08 23:08                                                           ` Jonathan Corbet
2015-06-08 23:08                                                             ` Jonathan Corbet
2015-05-14  7:08                                 ` [RFC PATCH v6] Documentation/arch: Add Documentation/arch-features.txt Ingo Molnar
2015-05-14  3:55                               ` Paul Mackerras
2015-05-14  7:02                                 ` Ingo Molnar
     [not found]                         ` <20150513094756.GD11030-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-05-13 14:09                           ` [RFC PATCH v5] Documentation/arch: Add Documentation/arch-TODO Michele Curti
2015-05-13 14:09                             ` Michele Curti
2015-05-13 14:42                             ` Geert Uytterhoeven
     [not found]                               ` <CAMuHMdXV68nie93Rb=Z+vYtn2aNex=s5E4+Z=QGojF+8EbPbKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-14  7:21                                 ` H. Peter Anvin
2015-05-14  7:21                                   ` H. Peter Anvin
2015-05-14  7:21                               ` H. Peter Anvin
     [not found]   ` <20150512142250.dcb053da81855ae1b5861173-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-05-13  0:53     ` [PATCHv2 1/2] clone: Support passing tls argument via C rather than pt_regs magic josh-iaAMLnmF4UmaiuxdJuQwMA
2015-05-13  0:53       ` josh
2015-05-13 22:56 ` Andrew Morton
2015-05-13 22:56   ` Andrew Morton
     [not found]   ` <20150513155628.65dc253bea9485cb7910678b-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2015-05-13 23:25     ` josh-iaAMLnmF4UmaiuxdJuQwMA
2015-05-13 23:25       ` josh

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=20150514100229.GA24432@gmail.com \
    --to=mingo-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=corbet-T1hC0tSOHrs@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=josh-iaAMLnmF4UmaiuxdJuQwMA@public.gmane.org \
    --cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-arch-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=luto-kltTT9wpgjJwATOyAt5JVQ@public.gmane.org \
    --cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.