linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found] ` <1227980689.6354.24.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2008-11-29 21:42   ` Alexey Dobriyan
       [not found]     ` <20081129214207.GA6747-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Alexey Dobriyan @ 2008-11-29 21:42 UTC (permalink / raw)
  To: Remi Colinet
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, akpm-3NddpPZAyC0,
	torvalds-3NddpPZAyC0, linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
> This patch add a new /proc/mempool file in order to display mempool usage.
> 
> The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
> configuration.

We're NOT adding config option per proc file.

And can we, please, freeze /proc for not per-process stuff and open debugfs
for random stuff, please?
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]     ` <20081129214207.GA6747-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
@ 2008-11-29 23:49       ` Greg KH
  2008-12-01 18:12         ` Randy Dunlap
  0 siblings, 1 reply; 12+ messages in thread
From: Greg KH @ 2008-11-29 23:49 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Remi Colinet, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	akpm-3NddpPZAyC0, torvalds-3NddpPZAyC0,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

On Sun, Nov 30, 2008 at 12:42:07AM +0300, Alexey Dobriyan wrote:
> On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
> > This patch add a new /proc/mempool file in order to display mempool usage.
> > 
> > The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
> > configuration.
> 
> We're NOT adding config option per proc file.
> 
> And can we, please, freeze /proc for not per-process stuff and open debugfs
> for random stuff, please?

debugfs has been open for random stuff since the day it was added to the
tree :)

Feel free to put this kind of thing there instead of proc.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
  2008-11-29 23:49       ` Greg KH
@ 2008-12-01 18:12         ` Randy Dunlap
  2008-12-01 19:13           ` Matt Mackall
  0 siblings, 1 reply; 12+ messages in thread
From: Randy Dunlap @ 2008-12-01 18:12 UTC (permalink / raw)
  To: Greg KH
  Cc: Alexey Dobriyan, Remi Colinet, linux-kernel, akpm, torvalds,
	linux-api, linux-fsdevel

On Sat, 29 Nov 2008 15:49:07 -0800 Greg KH wrote:

> On Sun, Nov 30, 2008 at 12:42:07AM +0300, Alexey Dobriyan wrote:
> > On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
> > > This patch add a new /proc/mempool file in order to display mempool usage.
> > > 
> > > The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
> > > configuration.
> > 
> > We're NOT adding config option per proc file.
> > 
> > And can we, please, freeze /proc for not per-process stuff and open debugfs
> > for random stuff, please?
> 
> debugfs has been open for random stuff since the day it was added to the
> tree :)
> 
> Feel free to put this kind of thing there instead of proc.

Do distros ship with debugfs enabled?
The problem with using debugfs is that it is very optional IMO.

---
~Randy

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
  2008-12-01 18:12         ` Randy Dunlap
@ 2008-12-01 19:13           ` Matt Mackall
  2008-12-01 20:02             ` Andrew Morton
  0 siblings, 1 reply; 12+ messages in thread
From: Matt Mackall @ 2008-12-01 19:13 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Greg KH, Alexey Dobriyan, Remi Colinet, linux-kernel, akpm,
	torvalds, linux-api, linux-fsdevel

On Mon, 2008-12-01 at 10:12 -0800, Randy Dunlap wrote:
> On Sat, 29 Nov 2008 15:49:07 -0800 Greg KH wrote:
> 
> > On Sun, Nov 30, 2008 at 12:42:07AM +0300, Alexey Dobriyan wrote:
> > > On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
> > > > This patch add a new /proc/mempool file in order to display mempool usage.
> > > > 
> > > > The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
> > > > configuration.
> > > 
> > > We're NOT adding config option per proc file.
> > > 
> > > And can we, please, freeze /proc for not per-process stuff and open debugfs
> > > for random stuff, please?
> > 
> > debugfs has been open for random stuff since the day it was added to the
> > tree :)
> > 
> > Feel free to put this kind of thing there instead of proc.
> 
> Do distros ship with debugfs enabled?
> The problem with using debugfs is that it is very optional IMO.

The problem with debugfs is that it claims to not be an ABI but it is
lying. Distributions ship tools that depend on portions of debugfs. And
they also ship debugfs in their kernel. So it is effectively the same
as /proc, except with the 1.0-era everything-goes attitude rather than
the 2.6-era we-should-really-think-about-this one.

Pushing stuff from procfs to debugfs is thus just setting us up for pain
down the road. Don't do it. In five years, we'll discover we can't turn
debugfs off or even clean it up because too much relies on it.

If you think that debugfs is NOT an ABI, then I'm sure you'll be happy
to ack my patch entitled 'gratuitously break usbmon to remind folks that
debugfs is not an ABI'.

-- 
Mathematics is the supreme nostalgia of our time.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
  2008-12-01 19:13           ` Matt Mackall
@ 2008-12-01 20:02             ` Andrew Morton
  2008-12-01 20:07               ` Pekka Enberg
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew Morton @ 2008-12-01 20:02 UTC (permalink / raw)
  To: Matt Mackall
  Cc: randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, greg-U8xfFu+wG4EAvxtiuMwx3w,
	adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

On Mon, 01 Dec 2008 13:13:31 -0600
Matt Mackall <mpm-VDJrAJ4Gl5ZBDgjK7y7TUQ@public.gmane.org> wrote:

> On Mon, 2008-12-01 at 10:12 -0800, Randy Dunlap wrote:
> > On Sat, 29 Nov 2008 15:49:07 -0800 Greg KH wrote:
> > 
> > > On Sun, Nov 30, 2008 at 12:42:07AM +0300, Alexey Dobriyan wrote:
> > > > On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
> > > > > This patch add a new /proc/mempool file in order to display mempool usage.
> > > > > 
> > > > > The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
> > > > > configuration.
> > > > 
> > > > We're NOT adding config option per proc file.
> > > > 
> > > > And can we, please, freeze /proc for not per-process stuff and open debugfs
> > > > for random stuff, please?
> > > 
> > > debugfs has been open for random stuff since the day it was added to the
> > > tree :)
> > > 
> > > Feel free to put this kind of thing there instead of proc.
> > 
> > Do distros ship with debugfs enabled?
> > The problem with using debugfs is that it is very optional IMO.
> 
> The problem with debugfs is that it claims to not be an ABI but it is
> lying. Distributions ship tools that depend on portions of debugfs. And
> they also ship debugfs in their kernel. So it is effectively the same
> as /proc, except with the 1.0-era everything-goes attitude rather than
> the 2.6-era we-should-really-think-about-this one.
> 
> Pushing stuff from procfs to debugfs is thus just setting us up for pain
> down the road. Don't do it. In five years, we'll discover we can't turn
> debugfs off or even clean it up because too much relies on it.
> 
> If you think that debugfs is NOT an ABI, then I'm sure you'll be happy
> to ack my patch entitled 'gratuitously break usbmon to remind folks that
> debugfs is not an ABI'.

^^ yup.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
  2008-12-01 20:02             ` Andrew Morton
@ 2008-12-01 20:07               ` Pekka Enberg
  2008-12-01 20:12                 ` Linus Torvalds
  0 siblings, 1 reply; 12+ messages in thread
From: Pekka Enberg @ 2008-12-01 20:07 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Matt Mackall, randy.dunlap, greg, adobriyan, remi.colinet,
	linux-kernel, torvalds, linux-api, linux-fsdevel

On Mon, Dec 1, 2008 at 10:02 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Mon, 01 Dec 2008 13:13:31 -0600
> Matt Mackall <mpm@selenic.com> wrote:
>
>> On Mon, 2008-12-01 at 10:12 -0800, Randy Dunlap wrote:
>> > On Sat, 29 Nov 2008 15:49:07 -0800 Greg KH wrote:
>> >
>> > > On Sun, Nov 30, 2008 at 12:42:07AM +0300, Alexey Dobriyan wrote:
>> > > > On Sat, Nov 29, 2008 at 06:44:49PM +0100, Remi Colinet wrote:
>> > > > > This patch add a new /proc/mempool file in order to display mempool usage.
>> > > > >
>> > > > > The feature can be disabled with CONFIG_PROC_MEMPOOL=N during kernel
>> > > > > configuration.
>> > > >
>> > > > We're NOT adding config option per proc file.
>> > > >
>> > > > And can we, please, freeze /proc for not per-process stuff and open debugfs
>> > > > for random stuff, please?
>> > >
>> > > debugfs has been open for random stuff since the day it was added to the
>> > > tree :)
>> > >
>> > > Feel free to put this kind of thing there instead of proc.
>> >
>> > Do distros ship with debugfs enabled?
>> > The problem with using debugfs is that it is very optional IMO.
>>
>> The problem with debugfs is that it claims to not be an ABI but it is
>> lying. Distributions ship tools that depend on portions of debugfs. And
>> they also ship debugfs in their kernel. So it is effectively the same
>> as /proc, except with the 1.0-era everything-goes attitude rather than
>> the 2.6-era we-should-really-think-about-this one.
>>
>> Pushing stuff from procfs to debugfs is thus just setting us up for pain
>> down the road. Don't do it. In five years, we'll discover we can't turn
>> debugfs off or even clean it up because too much relies on it.
>>
>> If you think that debugfs is NOT an ABI, then I'm sure you'll be happy
>> to ack my patch entitled 'gratuitously break usbmon to remind folks that
>> debugfs is not an ABI'.
>
> ^^ yup.

Hmm, I thought Documentation/ABI/ was supposed to tell us what's an
ABI you can depend on and what's not. I mean, you shouldn't be
depending on anything but the interfaces documented in
Documentation/ABI/stable/, no?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
  2008-12-01 20:07               ` Pekka Enberg
@ 2008-12-01 20:12                 ` Linus Torvalds
       [not found]                   ` <alpine.LFD.2.00.0812011210030.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
  0 siblings, 1 reply; 12+ messages in thread
From: Linus Torvalds @ 2008-12-01 20:12 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Andrew Morton, Matt Mackall, randy.dunlap, greg, adobriyan,
	remi.colinet, linux-kernel, linux-api, linux-fsdevel



On Mon, 1 Dec 2008, Pekka Enberg wrote:
> 
> Hmm, I thought Documentation/ABI/ was supposed to tell us what's an
> ABI you can depend on and what's not. I mean, you shouldn't be
> depending on anything but the interfaces documented in
> Documentation/ABI/stable/, no?

Who is the f*cking MORON that thinks that "documentation" has any meaning 
what-so-ever?

The fact that something is documented (whether correctly or not) has 
absolutely _zero_ impact on anything at all. What makes something an ABI 
is that it's useful and available. The only way something isn't an ABI is 
by _explicitly_ making sure that it's not available even by mistake in a 
stable form for binary use.

Example: kernel internal data structures and function calls. We make sure 
that you simply _cannot_ make a binary that works across kernel versions. 
That is the only way for an ABI to not form.

		Linus

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]                   ` <alpine.LFD.2.00.0812011210030.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
@ 2008-12-01 20:23                     ` Linus Torvalds
  2008-12-01 22:02                     ` Pekka Enberg
  1 sibling, 0 replies; 12+ messages in thread
From: Linus Torvalds @ 2008-12-01 20:23 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Andrew Morton, Matt Mackall, randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA,
	greg-U8xfFu+wG4EAvxtiuMwx3w, adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA



On Mon, 1 Dec 2008, Linus Torvalds wrote:
> 
> The fact that something is documented (whether correctly or not) has 
> absolutely _zero_ impact on anything at all. What makes something an ABI 
> is that it's useful and available. The only way something isn't an ABI is 
> by _explicitly_ making sure that it's not available even by mistake in a 
> stable form for binary use.

Of course, the alternate form is to make it so _useless_ that people won't 
use it even if it's available, and I guess we do have those kinds of 
interfaces too. But we generally don't need to worry about unused and 
useless interfaces very much, so it doesn't tend to matter much.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]                   ` <alpine.LFD.2.00.0812011210030.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
  2008-12-01 20:23                     ` Linus Torvalds
@ 2008-12-01 22:02                     ` Pekka Enberg
       [not found]                       ` <84144f020812011402v3cb3ab24pf5cb6310f2d00c5b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Pekka Enberg @ 2008-12-01 22:02 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Andrew Morton, Matt Mackall, randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA,
	greg-U8xfFu+wG4EAvxtiuMwx3w, adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

Hi Linus,

On Mon, 1 Dec 2008, Pekka Enberg wrote:
>> Hmm, I thought Documentation/ABI/ was supposed to tell us what's an
>> ABI you can depend on and what's not. I mean, you shouldn't be
>> depending on anything but the interfaces documented in
>> Documentation/ABI/stable/, no?

On Mon, Dec 1, 2008 at 10:12 PM, Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
> Who is the f*cking MORON that thinks that "documentation" has any meaning
> what-so-ever?

Me, I suppose. At least that's the impression I got when being asked
to document any new kmemtrace debugfs files, for example.

On Mon, Dec 1, 2008 at 10:12 PM, Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
> The fact that something is documented (whether correctly or not) has
> absolutely _zero_ impact on anything at all. What makes something an ABI
> is that it's useful and available. The only way something isn't an ABI is
> by _explicitly_ making sure that it's not available even by mistake in a
> stable form for binary use.

OK, but why do we have those different ABI "stages" in
Documentation/ABI then? The README file there seems to contradict what
you say. Or maybe I'm reading it wrong...

                         Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]                       ` <84144f020812011402v3cb3ab24pf5cb6310f2d00c5b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2008-12-01 22:20                         ` Matt Mackall
  2008-12-02  2:54                         ` Linus Torvalds
  1 sibling, 0 replies; 12+ messages in thread
From: Matt Mackall @ 2008-12-01 22:20 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Linus Torvalds, Andrew Morton,
	randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, greg-U8xfFu+wG4EAvxtiuMwx3w,
	adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

On Tue, 2008-12-02 at 00:02 +0200, Pekka Enberg wrote:
> Hi Linus,
> 
> On Mon, 1 Dec 2008, Pekka Enberg wrote:
> >> Hmm, I thought Documentation/ABI/ was supposed to tell us what's an
> >> ABI you can depend on and what's not. I mean, you shouldn't be
> >> depending on anything but the interfaces documented in
> >> Documentation/ABI/stable/, no?
> 
> On Mon, Dec 1, 2008 at 10:12 PM, Linus Torvalds
> <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
> > Who is the f*cking MORON that thinks that "documentation" has any meaning
> > what-so-ever?
> 
> Me, I suppose. At least that's the impression I got when being asked
> to document any new kmemtrace debugfs files, for example.
> 
> On Mon, Dec 1, 2008 at 10:12 PM, Linus Torvalds
> <torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
> > The fact that something is documented (whether correctly or not) has
> > absolutely _zero_ impact on anything at all. What makes something an ABI
> > is that it's useful and available. The only way something isn't an ABI is
> > by _explicitly_ making sure that it's not available even by mistake in a
> > stable form for binary use.
> 
> OK, but why do we have those different ABI "stages" in
> Documentation/ABI then? The README file there seems to contradict what
> you say. Or maybe I'm reading it wrong...

If the terrain and the map do not agree, follow the terrain. – Swedish
army manual.

If code uses a public interface and we break that interface, we will get
unhappy users. Putting stuff in debugfs/ in a released kernel makes it
public. That's the terrain.

-- 
Mathematics is the supreme nostalgia of our time.

--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]                       ` <84144f020812011402v3cb3ab24pf5cb6310f2d00c5b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  2008-12-01 22:20                         ` Matt Mackall
@ 2008-12-02  2:54                         ` Linus Torvalds
       [not found]                           ` <alpine.LFD.2.00.0812011843340.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
  1 sibling, 1 reply; 12+ messages in thread
From: Linus Torvalds @ 2008-12-02  2:54 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Andrew Morton, Matt Mackall, randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA,
	greg-U8xfFu+wG4EAvxtiuMwx3w, adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA



On Tue, 2 Dec 2008, Pekka Enberg wrote:
> 
> OK, but why do we have those different ABI "stages" in
> Documentation/ABI then? The README file there seems to contradict what
> you say. Or maybe I'm reading it wrong...

I think that whole Documentation/ABI stuff is utter tosh, and should just 
be thrown out, whenever it talks about interfaces that are _not_ ABI's.

IOW, it's fine to document things that are actually supposed to be stable, 
but:

 - assuming that non-documentation means that it's not an ABI is bogus
   and wrong.

 - explicitly documenting something as "not an ABI" is wrongheaded and 
   stupid, because it's meaningless and only sets people up for being 
   disappointed later.

So yeah, I think we might as well remove the "testing" one. Right now it 
can act in two ways:

 - as documentation on how to use it (ie as "stable").

   This is fine, but then it shouldn't be called "testing", should it?

 - as an excuse for whining later when it _did_ get used, and people break 
   exported ABI's, and we need to revert the breakage.

   And this is the one that I don't think is valid. No amount of 
   documentation will ever make something less stable.

So as far as I'm concerned, "testing" should either go away (as a way to 
discourage people from even _knowing_ about the things, and hoping that 
they never get used), or it should be moved to "stable".

And in the end, nothing is ever totally black-and-white or quite that 
simple, but that's the mindset you should have.

Finally, when it comes to documentation as a bigger issue:

 - wrong documentation is irrelevant. It doesn't matter if the 
   documentation says "X", when the code does "Y".

   If people rely on "Y", then pointing at the docs and saying "but you 
   should never have relied on it, because teh docs say X" is totally and 
   utterly bogus. The _documentation_ was wrong. Don't ever use incorrect 
   documentation as an excuse. 

Too many people seem to think that documentation is the "final" argument. 
It's not. Not even close. It's a hint and a help, but it's _secondary_ to 
code. Anybody who doesn't understand that should never be allowed to write 
code (or documentation, for that matte).

[ The same is true of assert()'s in code too - I've seen too many damn 
  asserts that were simply _wrong_, and then when they triggered, people 
  would always blindly assume that the assert() was right, and try to 
  change the code to suit. For some reason people have a hard time asking 
  themselves whether perhaps the bug was in the assertion itself. ]

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [RESEND][PATCH] Add /proc/mempool to display mempool usage
       [not found]                           ` <alpine.LFD.2.00.0812011843340.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
@ 2008-12-04 16:02                             ` Michael Kerrisk
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Kerrisk @ 2008-12-04 16:02 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Pekka Enberg, Andrew Morton, Matt Mackall,
	randy.dunlap-QHcLZuEGTsvQT0dZR+AlfA, greg-U8xfFu+wG4EAvxtiuMwx3w,
	adobriyan-Re5JQEeQqe8AvxtiuMwx3w,
	remi.colinet-Re5JQEeQqe8AvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-api-u79uwXL29TY76Z2rM5mHXA,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA

On Mon, Dec 1, 2008 at 9:54 PM, Linus Torvalds
<torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> wrote:
>
>
> On Tue, 2 Dec 2008, Pekka Enberg wrote:
>>
>> OK, but why do we have those different ABI "stages" in
>> Documentation/ABI then? The README file there seems to contradict what
>> you say. Or maybe I'm reading it wrong...
>
> I think that whole Documentation/ABI stuff is utter tosh, and should just
> be thrown out, whenever it talks about interfaces that are _not_ ABI's.
>
> IOW, it's fine to document things that are actually supposed to be stable,
> but:
>
>  - assuming that non-documentation means that it's not an ABI is bogus
>   and wrong.

Agreed.  (When so much is much is undocumented anyway, there is no way
that lack of documentation can be used to signal "this is not an ABI.)

>  - explicitly documenting something as "not an ABI" is wrongheaded and
>   stupid, because it's meaningless and only sets people up for being
>   disappointed later.

Agreed.

[...]

> Finally, when it comes to documentation as a bigger issue:
>
>  - wrong documentation is irrelevant. It doesn't matter if the
>   documentation says "X", when the code does "Y".
>
>   If people rely on "Y", then pointing at the docs and saying "but you
>   should never have relied on it, because teh docs say X" is totally and
>   utterly bogus. The _documentation_ was wrong. Don't ever use incorrect
>   documentation as an excuse.

Agreed.

> Too many people seem to think that documentation is the "final" argument.
> It's not. Not even close. It's a hint and a help, but it's _secondary_ to
> code. Anybody who doesn't understand that should never be allowed to write
> code (or documentation, for that matte).

While clearly documentation is not the final answer, I think you
undervalue it somewhat, and I think it's worth mentioning two specific
points.  Documentation may be secondary to code, but it can help a
lot, especially if:

* The documentation is done at the same time as the code (by the
developer, or by someone working with the developer).  This typically
makes the developer think more about the code they are writing.  It
also gives others to more quickly understand the code with the aim of
reviewing the code and/or API design, and perhaps testing it.  There
simply isn't enough review and testing going on, and documentation can
make a real difference there, IMO.

*  While the "but you should never have relied on it, because the docs
say X" argument may not hold, there is one important way that I think
documentation can still help: explicitly saying that "the behavior is
unspecified around point X, and other code should not rely on a
specific behavior".  This legitimately allows developers to change the
behavior around point X in the future.  (I made the point at LPC, if
you force users to read the code behind an API, then you end up
creating a "tight spec", since they will do exactly what the code
permits.  In this sense, documentation can be used to "loosen" the
spec.)

Cheers,

Michael




-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-12-04 16:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1227980689.6354.24.camel@localhost.localdomain>
     [not found] ` <1227980689.6354.24.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2008-11-29 21:42   ` [RESEND][PATCH] Add /proc/mempool to display mempool usage Alexey Dobriyan
     [not found]     ` <20081129214207.GA6747-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2008-11-29 23:49       ` Greg KH
2008-12-01 18:12         ` Randy Dunlap
2008-12-01 19:13           ` Matt Mackall
2008-12-01 20:02             ` Andrew Morton
2008-12-01 20:07               ` Pekka Enberg
2008-12-01 20:12                 ` Linus Torvalds
     [not found]                   ` <alpine.LFD.2.00.0812011210030.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
2008-12-01 20:23                     ` Linus Torvalds
2008-12-01 22:02                     ` Pekka Enberg
     [not found]                       ` <84144f020812011402v3cb3ab24pf5cb6310f2d00c5b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-12-01 22:20                         ` Matt Mackall
2008-12-02  2:54                         ` Linus Torvalds
     [not found]                           ` <alpine.LFD.2.00.0812011843340.3256-nfNrOhbfy2R17+2ddN/4kux8cNe9sq/dYPYVAmT7z5s@public.gmane.org>
2008-12-04 16:02                             ` Michael Kerrisk

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).