linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Scheduler ( was: Just a second ) ...
       [not found] <Pine.LNX.4.33.0112181508001.3410-100000@penguin.transmeta.com>
@ 2001-12-20  3:50 ` Rik van Riel
  2001-12-20  4:04   ` Ryan Cumming
                     ` (3 more replies)
  2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
  1 sibling, 4 replies; 16+ messages in thread
From: Rik van Riel @ 2001-12-20  3:50 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: Benjamin LaHaise, Alan Cox, Davide Libenzi, Kernel Mailing List

On Tue, 18 Dec 2001, Linus Torvalds wrote:

> The thing is, I'm personally very suspicious of the "features for that
> exclusive 0.1%" mentality.

Then why do we have sendfile(), or that idiotic sys_readahead() ?

(is there _any_ use for sys_readahead() ?  at all ?)

cheers,

Rik
-- 
Shortwave goes a long way:  irc.starchat.net  #swl

http://www.surriel.com/		http://distro.conectiva.com/


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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
@ 2001-12-20  4:04   ` Ryan Cumming
  2001-12-20  5:52   ` Linus Torvalds
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Ryan Cumming @ 2001-12-20  4:04 UTC (permalink / raw)
  To: Rik van Riel; +Cc: linux-kernel, torvalds

On December 19, 2001 19:50, Rik van Riel wrote:
> On Tue, 18 Dec 2001, Linus Torvalds wrote:
> > The thing is, I'm personally very suspicious of the "features for that
> > exclusive 0.1%" mentality.
>
> Then why do we have sendfile(), or that idiotic sys_readahead() ?

Damn straights

sendfile(2) had an oppertunity to be a real extention of the Unix philosophy. 
If it was called something like "copy" (to match "read" and "write"), and 
worked on all fds (even if it didn't do zerocopy, it should still just work), 
it'd fit in a lot more nicely than even BSD sockets. Alas, as it is, it's 
more of a wart than an extention. 

Now, sys_readahead() is pretty much the stupidest thing I've ever heard. If 
we had a copy(2) syscall, we could do the same thing by: copy(sourcefile, 
/dev/null, count). I don't think sys_readahead() even qualifies as a wart. 

-Ryan

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

* Re: Scheduler ( was: Just a second ) ...
       [not found] <Pine.LNX.4.33.0112181508001.3410-100000@penguin.transmeta.com>
  2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
@ 2001-12-20  5:39 ` David S. Miller
  2001-12-20  5:58   ` Linus Torvalds
                     ` (3 more replies)
  1 sibling, 4 replies; 16+ messages in thread
From: David S. Miller @ 2001-12-20  5:39 UTC (permalink / raw)
  To: riel; +Cc: torvalds, bcrl, alan, davidel, linux-kernel

   From: Rik van Riel <riel@conectiva.com.br>
   Date: Thu, 20 Dec 2001 01:50:36 -0200 (BRST)

   On Tue, 18 Dec 2001, Linus Torvalds wrote:
   
   > The thing is, I'm personally very suspicious of the "features for that
   > exclusive 0.1%" mentality.
   
   Then why do we have sendfile(), or that idiotic sys_readahead() ?

Sending files over sockets are %99 of what most network servers are
actually doing today, it is much more than 0.1% :-)

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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
  2001-12-20  4:04   ` Ryan Cumming
@ 2001-12-20  5:52   ` Linus Torvalds
  2001-12-20  6:33   ` Scheduler, Can we save some juice Timothy Covell
  2001-12-20  6:52   ` Robert Love
  3 siblings, 0 replies; 16+ messages in thread
From: Linus Torvalds @ 2001-12-20  5:52 UTC (permalink / raw)
  To: Rik van Riel
  Cc: Benjamin LaHaise, Alan Cox, Davide Libenzi, Kernel Mailing List


On Thu, 20 Dec 2001, Rik van Riel wrote:
> On Tue, 18 Dec 2001, Linus Torvalds wrote:
>
> > The thing is, I'm personally very suspicious of the "features for that
> > exclusive 0.1%" mentality.
>
> Then why do we have sendfile(), or that idiotic sys_readahead() ?

Hey, I expect others to do things in their tree, and I live by the same
rules: I do my stuff openly in my tree.

The Apache people actually seemed quite interested in sendfile. Of course,
that was before apache seemed to stop worrying about trying to beat
others at performance (rightly or wrongly - I think they are right
from a pragmatic viewpoint, and wrong from a PR one).

And hey, the same way I encourage others to experiment openly with their
trees, I experiment with mine.

			Linus


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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
@ 2001-12-20  5:58   ` Linus Torvalds
  2001-12-20  6:01   ` David S. Miller
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 16+ messages in thread
From: Linus Torvalds @ 2001-12-20  5:58 UTC (permalink / raw)
  To: David S. Miller; +Cc: riel, bcrl, alan, davidel, linux-kernel


On Wed, 19 Dec 2001, David S. Miller wrote:
>
>    Then why do we have sendfile(), or that idiotic sys_readahead() ?
>
> Sending files over sockets are %99 of what most network servers are
> actually doing today, it is much more than 0.1% :-)

Well, that was true when the thing was written, but whether anybody _uses_
it any more, I don't know. Tux gets the same effect on its own, and I
don't know if Apache defaults to using sendfile or not.

readahead was just a personal 5-minute experiment, we can certainly remove
that ;)

		Linus


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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
  2001-12-20  5:58   ` Linus Torvalds
@ 2001-12-20  6:01   ` David S. Miller
  2001-12-20 22:40     ` Troels Walsted Hansen
  2001-12-20 11:29   ` Rik van Riel
  2001-12-20 11:34   ` David S. Miller
  3 siblings, 1 reply; 16+ messages in thread
From: David S. Miller @ 2001-12-20  6:01 UTC (permalink / raw)
  To: torvalds; +Cc: riel, bcrl, alan, davidel, linux-kernel

   From: Linus Torvalds <torvalds@transmeta.com>
   Date: Wed, 19 Dec 2001 21:58:41 -0800 (PST)
   
   Well, that was true when the thing was written, but whether anybody _uses_
   it any more, I don't know. Tux gets the same effect on its own, and I
   don't know if Apache defaults to using sendfile or not.
   
Samba uses it by default, that I know for sure :-)

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

* Scheduler, Can we save some juice ...
  2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
  2001-12-20  4:04   ` Ryan Cumming
  2001-12-20  5:52   ` Linus Torvalds
@ 2001-12-20  6:33   ` Timothy Covell
  2001-12-20  6:50     ` Ryan Cumming
  2001-12-20  6:52   ` Robert Love
  3 siblings, 1 reply; 16+ messages in thread
From: Timothy Covell @ 2001-12-20  6:33 UTC (permalink / raw)
  To: Rik van Riel, Linus Torvalds
  Cc: Benjamin LaHaise, Alan Cox, Davide Libenzi, Kernel Mailing List

On Wednesday 19 December 2001 21:50, Rik van Riel wrote:
> On Tue, 18 Dec 2001, Linus Torvalds wrote:
> > The thing is, I'm personally very suspicious of the "features for that
> > exclusive 0.1%" mentality.
>
> Then why do we have sendfile(), or that idiotic sys_readahead() ?
>
> (is there _any_ use for sys_readahead() ?  at all ?)
>
> cheers,
>
> Rik


OK, here's another 0.1% for you.  Considering how Linux SMP
doesn't have high CPU affinity, would it be possible to make a
patch such that the additional CPUs remain in deep sleep/HALT
mode until the first CPU hits a high-water mark of say 90% 
utilization?  I've started doing this by hand with the (x)pulse
application.   My goal is to save electricity and cut down on 
excess heat when I'm just browsing the web and not compiling
or seti@home'ing.


-- 
timothy.covell@ashavan.org.

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

* Re: Scheduler, Can we save some juice ...
  2001-12-20  6:33   ` Scheduler, Can we save some juice Timothy Covell
@ 2001-12-20  6:50     ` Ryan Cumming
  0 siblings, 0 replies; 16+ messages in thread
From: Ryan Cumming @ 2001-12-20  6:50 UTC (permalink / raw)
  To: timothy.covell; +Cc: Kernel Mailing List

On December 19, 2001 22:33, Timothy Covell wrote:
> OK, here's another 0.1% for you.  Considering how Linux SMP
> doesn't have high CPU affinity, would it be possible to make a
> patch such that the additional CPUs remain in deep sleep/HALT
> mode until the first CPU hits a high-water mark of say 90%
> utilization?  I've started doing this by hand with the (x)pulse
> application.   My goal is to save electricity and cut down on
> excess heat when I'm just browsing the web and not compiling
> or seti@home'ing.

I seriously doubt there would be a noticable power consumption or heat 
difference between two CPU's running HLT half the time, and one CPU running 
HLT all the time. And I'm downright certain it isn't worth the code 
complexity even if it was, there is very little (read: no) intersection 
between the SMP and low-power user base.

-Ryan

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

* Re: Scheduler, Can we save some juice ...
  2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
                     ` (2 preceding siblings ...)
  2001-12-20  6:33   ` Scheduler, Can we save some juice Timothy Covell
@ 2001-12-20  6:52   ` Robert Love
  2001-12-20 17:39     ` Timothy Covell
  3 siblings, 1 reply; 16+ messages in thread
From: Robert Love @ 2001-12-20  6:52 UTC (permalink / raw)
  To: timothy.covell
  Cc: Rik van Riel, Linus Torvalds, Benjamin LaHaise, Alan Cox,
	Davide Libenzi, Kernel Mailing List

On Thu, 2001-12-20 at 01:33, Timothy Covell wrote:

> OK, here's another 0.1% for you.  Considering how Linux SMP
> doesn't have high CPU affinity, would it be possible to make a
> patch such that the additional CPUs remain in deep sleep/HALT
> mode until the first CPU hits a high-water mark of say 90% 
> utilization?  I've started doing this by hand with the (x)pulse
> application.   My goal is to save electricity and cut down on 
> excess heat when I'm just browsing the web and not compiling
> or seti@home'ing.

You'd probably be better off working against load and not CPU usage,
since a single app can hit you at 100% CPU.  Load average is the sort of
metric you want, since if there is more than 1 task waiting to run on
average, you will benefit from multiple CPUs.

That said, this would be easy to do in user space using the hotplug CPU
patch.  Monitor load average (just like any X applet does) and when it
crosses over the threshold: "echo 1 > /proc/sys/cpu/2/online"

Another solution would be to use CPU affinity to lock init (and thus all
tasks) to 0x00000001 or whatever and then start allowing 0x00000002 or
whatever when load gets too high.

My point: it is awful easy in user space.

	Robert Love


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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
  2001-12-20  5:58   ` Linus Torvalds
  2001-12-20  6:01   ` David S. Miller
@ 2001-12-20 11:29   ` Rik van Riel
  2001-12-20 11:34   ` David S. Miller
  3 siblings, 0 replies; 16+ messages in thread
From: Rik van Riel @ 2001-12-20 11:29 UTC (permalink / raw)
  To: David S. Miller; +Cc: torvalds, bcrl, alan, davidel, linux-kernel

On Wed, 19 Dec 2001, David S. Miller wrote:
> From: Rik van Riel <riel@conectiva.com.br>
>    On Tue, 18 Dec 2001, Linus Torvalds wrote:
>
>    > The thing is, I'm personally very suspicious of the "features for that
>    > exclusive 0.1%" mentality.
>
>    Then why do we have sendfile(), or that idiotic sys_readahead() ?
>
> Sending files over sockets are %99 of what most network servers are
> actually doing today, it is much more than 0.1% :-)

The same could be said for AIO, there are a _lot_ of
server programs which are heavily overthreaded because
of a lack of AIO...

cheers,

Rik
-- 
Shortwave goes a long way:  irc.starchat.net  #swl

http://www.surriel.com/		http://distro.conectiva.com/


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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
                     ` (2 preceding siblings ...)
  2001-12-20 11:29   ` Rik van Riel
@ 2001-12-20 11:34   ` David S. Miller
  3 siblings, 0 replies; 16+ messages in thread
From: David S. Miller @ 2001-12-20 11:34 UTC (permalink / raw)
  To: riel; +Cc: torvalds, bcrl, alan, davidel, linux-kernel

   From: Rik van Riel <riel@conectiva.com.br>
   Date: Thu, 20 Dec 2001 09:29:28 -0200 (BRST)

   On Wed, 19 Dec 2001, David S. Miller wrote:
   > Sending files over sockets are %99 of what most network servers are
   > actually doing today, it is much more than 0.1% :-)
   
   The same could be said for AIO, there are a _lot_ of
   server programs which are heavily overthreaded because
   of a lack of AIO...

If you read my most recent responses to Ingo's postings, you'll see
that I'm starting to completely agree with you :-)

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

* Re: Scheduler, Can we save some juice ...
  2001-12-20  6:52   ` Robert Love
@ 2001-12-20 17:39     ` Timothy Covell
  0 siblings, 0 replies; 16+ messages in thread
From: Timothy Covell @ 2001-12-20 17:39 UTC (permalink / raw)
  To: Robert Love; +Cc: linux-kernel

On Thursday 20 December 2001 00:52, Robert Love wrote:
> On Thu, 2001-12-20 at 01:33, Timothy Covell wrote:
> > OK, here's another 0.1% for you.  Considering how Linux SMP
> > doesn't have high CPU affinity, would it be possible to make a
> > patch such that the additional CPUs remain in deep sleep/HALT
> > mode until the first CPU hits a high-water mark of say 90%
> > utilization?  I've started doing this by hand with the (x)pulse
> > application.   My goal is to save electricity and cut down on
> > excess heat when I'm just browsing the web and not compiling
> > or seti@home'ing.
>
> You'd probably be better off working against load and not CPU usage,
> since a single app can hit you at 100% CPU.  Load average is the sort of
> metric you want, since if there is more than 1 task waiting to run on
> average, you will benefit from multiple CPUs.
>
> That said, this would be easy to do in user space using the hotplug CPU
> patch.  Monitor load average (just like any X applet does) and when it
> crosses over the threshold: "echo 1 > /proc/sys/cpu/2/online"
>
> Another solution would be to use CPU affinity to lock init (and thus all
> tasks) to 0x00000001 or whatever and then start allowing 0x00000002 or
> whatever when load gets too high.
>
> My point: it is awful easy in user space.
>
> 	Robert Love
>

You make good points.  I'll try the hotplug CPU patch to automate things
more than with my simple use of Xpulse, (whose code I could have
used if I wanted to get off my butt and write a useful C application.)


-- 
timothy.covell@ashavan.org.

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

* RE: Scheduler ( was: Just a second ) ...
  2001-12-20  6:01   ` David S. Miller
@ 2001-12-20 22:40     ` Troels Walsted Hansen
  2001-12-20 23:55       ` Chris Ricker
  0 siblings, 1 reply; 16+ messages in thread
From: Troels Walsted Hansen @ 2001-12-20 22:40 UTC (permalink / raw)
  To: 'David S. Miller'; +Cc: linux-kernel

>From: David S. Miller
>   From: Linus Torvalds <torvalds@transmeta.com>
>   Well, that was true when the thing was written, but whether anybody
_uses_
>   it any more, I don't know. Tux gets the same effect on its own, and
I
>   don't know if Apache defaults to using sendfile or not.
>   
>Samba uses it by default, that I know for sure :-)

I wish... Neither Samba 2.2.2 nor the bleeding edge 3.0alpha11 includes
the word "sendfile" in the source at least. :( Wonder why the sendfile
patches where never merged...

--
Troels Walsted Hansen


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

* RE: Scheduler ( was: Just a second ) ...
  2001-12-20 22:40     ` Troels Walsted Hansen
@ 2001-12-20 23:55       ` Chris Ricker
  2001-12-20 23:59         ` CaT
  2001-12-21  0:06         ` Davide Libenzi
  0 siblings, 2 replies; 16+ messages in thread
From: Chris Ricker @ 2001-12-20 23:55 UTC (permalink / raw)
  To: Troels Walsted Hansen; +Cc: 'David S. Miller', World Domination Now!

On Thu, 20 Dec 2001, Troels Walsted Hansen wrote:

> >From: David S. Miller
> >   From: Linus Torvalds <torvalds@transmeta.com>
> >   Well, that was true when the thing was written, but whether anybody
> _uses_
> >   it any more, I don't know. Tux gets the same effect on its own, and
> I
> >   don't know if Apache defaults to using sendfile or not.
> >   
> >Samba uses it by default, that I know for sure :-)
> 
> I wish... Neither Samba 2.2.2 nor the bleeding edge 3.0alpha11 includes
> the word "sendfile" in the source at least. :( Wonder why the sendfile
> patches where never merged...

The only real-world source I've noticed actually using sendfile() are some
of the better ftp daemons (such as vsftpd).

later,
chris

-- 
Chris Ricker                                               kaboom@gatech.edu

This is a dare to the Bush administration.
        -- Thurston Moore



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

* Re: Scheduler ( was: Just a second ) ...
  2001-12-20 23:55       ` Chris Ricker
@ 2001-12-20 23:59         ` CaT
  2001-12-21  0:06         ` Davide Libenzi
  1 sibling, 0 replies; 16+ messages in thread
From: CaT @ 2001-12-20 23:59 UTC (permalink / raw)
  To: Chris Ricker
  Cc: Troels Walsted Hansen, 'David S. Miller', World Domination Now!

On Thu, Dec 20, 2001 at 04:55:55PM -0700, Chris Ricker wrote:
> > I wish... Neither Samba 2.2.2 nor the bleeding edge 3.0alpha11 includes
> > the word "sendfile" in the source at least. :( Wonder why the sendfile
> > patches where never merged...
> 
> The only real-world source I've noticed actually using sendfile() are some
> of the better ftp daemons (such as vsftpd).

proftpd uses it also.

-- 
CaT        - A high level of technology does not a civilisation make.

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

* RE: Scheduler ( was: Just a second ) ...
  2001-12-20 23:55       ` Chris Ricker
  2001-12-20 23:59         ` CaT
@ 2001-12-21  0:06         ` Davide Libenzi
  1 sibling, 0 replies; 16+ messages in thread
From: Davide Libenzi @ 2001-12-21  0:06 UTC (permalink / raw)
  To: Chris Ricker
  Cc: Troels Walsted Hansen, 'David S. Miller', World Domination Now!

On Thu, 20 Dec 2001, Chris Ricker wrote:

> On Thu, 20 Dec 2001, Troels Walsted Hansen wrote:
>
> > >From: David S. Miller
> > >   From: Linus Torvalds <torvalds@transmeta.com>
> > >   Well, that was true when the thing was written, but whether anybody
> > _uses_
> > >   it any more, I don't know. Tux gets the same effect on its own, and
> > I
> > >   don't know if Apache defaults to using sendfile or not.
> > >
> > >Samba uses it by default, that I know for sure :-)
> >
> > I wish... Neither Samba 2.2.2 nor the bleeding edge 3.0alpha11 includes
> > the word "sendfile" in the source at least. :( Wonder why the sendfile
> > patches where never merged...
>
> The only real-world source I've noticed actually using sendfile() are some
> of the better ftp daemons (such as vsftpd).

And XMail :)




- Davide



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

end of thread, other threads:[~2001-12-21  0:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.33.0112181508001.3410-100000@penguin.transmeta.com>
2001-12-20  3:50 ` Scheduler ( was: Just a second ) Rik van Riel
2001-12-20  4:04   ` Ryan Cumming
2001-12-20  5:52   ` Linus Torvalds
2001-12-20  6:33   ` Scheduler, Can we save some juice Timothy Covell
2001-12-20  6:50     ` Ryan Cumming
2001-12-20  6:52   ` Robert Love
2001-12-20 17:39     ` Timothy Covell
2001-12-20  5:39 ` Scheduler ( was: Just a second ) David S. Miller
2001-12-20  5:58   ` Linus Torvalds
2001-12-20  6:01   ` David S. Miller
2001-12-20 22:40     ` Troels Walsted Hansen
2001-12-20 23:55       ` Chris Ricker
2001-12-20 23:59         ` CaT
2001-12-21  0:06         ` Davide Libenzi
2001-12-20 11:29   ` Rik van Riel
2001-12-20 11:34   ` David S. Miller

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