public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Kegel <dank@alumni.caltech.edu>
To: Manfred <manfred@colorfullife.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] up to 50% faster sys_poll()
Date: Sat, 06 Jan 2001 16:13:37 -0800	[thread overview]
Message-ID: <3A57B4B1.C8BADE31@alumni.caltech.edu> (raw)
In-Reply-To: <3A579508.CF755874@alumni.caltech.edu> <3A57A668.7D4D8E46@colorfullife.com>

Manfred wrote:
> The improvement with large number of pipes probably comes from replacing
> __get_free_page() with kmalloc() - kmalloc is faster, especially on SMP.
> ...
> I expected 2 improvements:
> * poll with < 24 descriptors: around 800 cpu ticks faster, but that's
> just one or two microseconds.
> * if one of the first 8 descriptors has new data: add another ~200 cpu
> ticks.

OK, I reran with different numbers of fd's, again on a 650 MHz dual PIII SMP.

Times in microseconds to find 1 active pipe out of N total pipes:

                number of pipes
kernel        1      8      10000   30000
-----------------------------------------
2.4.0         7     10      14600   45843
2.4.0-pp      5      8      14321   44903

For small N, your patch makes poll() 2 microseconds faster uniformly.
That's a 20-30% speedup, not bad.
Anyone know if this would actually help real-life programs?

BTW, your change makes poll() slightly faster than select().

For large N, your patch speeds poll() up by 2-5%.  
(Increasing /proc/sys/fs/file-max to 70000 appears to reduce the speedup.)
I doubt that will have much effect on real-life programs.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2001-01-07  0:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-06 21:58 [PATCH] up to 50% faster sys_poll() Dan Kegel
     [not found] ` <3A57A668.7D4D8E46@colorfullife.com>
2001-01-07  0:13   ` Dan Kegel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-05 13:28 Manfred

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=3A57B4B1.C8BADE31@alumni.caltech.edu \
    --to=dank@alumni.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /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