All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [RFC] O(1) proc_pid_readdir
Date: Sun, 16 Mar 2003 13:35:16 -0800	[thread overview]
Message-ID: <20030316213516.GM20188@holomorphy.com> (raw)
In-Reply-To: <3E74EB92.7010801@colorfullife.com>

Ingo Molnar wrote:
>> have you seen my "procfs/procps threading performance speedup" patch? It
>> does something like this.

On Sun, Mar 16, 2003 at 10:24:34PM +0100, Manfred Spraul wrote:
> Interesting patch. Do seekdir and telldir still work? I think you must 
> detect lseek calls and invalidate the cookie - either by hooking lseek 
> or by looking at f_version.
> I think my solution for proc_pid_readdir() is better: You must fall back 
> to the old algorithm if the pid number stored in f_private got invalid 
> between two syscalls. I've modified the hash table slightly and search 
> for the next pid value directly, which works even if the current 
> position disappeared.

I'm heavily on the side of deterministic bounds here (these things trip
the NMI oopser, so if the bounds aren't deterministic, neither is
stability), so I favor manfred's proc_pid_readdir() algorithm.

It actually looks compatible with your prior patch aside from replacing
and/or modifying its get_pid_list() speedup.


-- wli

  reply	other threads:[~2003-03-16 21:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-16 15:52 [RFC] O(1) proc_pid_readdir Manfred Spraul
2003-03-16 20:10 ` William Lee Irwin III
2003-03-16 21:05 ` Ingo Molnar
2003-03-16 21:24   ` Manfred Spraul
2003-03-16 21:35     ` William Lee Irwin III [this message]
2003-03-16 21:45       ` Manfred Spraul
2003-03-17  6:22       ` Ingo Molnar
2003-03-17  7:03         ` William Lee Irwin III
2003-03-17 18:17           ` Manfred Spraul
2003-03-18  0:14             ` William Lee Irwin III
2003-03-18  0:48               ` William Lee Irwin III
2003-03-18  1:22                 ` William Lee Irwin III
2003-03-18  9:25             ` William Lee Irwin III
2003-03-17  6:19     ` Ingo Molnar
2003-03-22 16:02   ` Manfred Spraul

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=20030316213516.GM20188@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=mingo@elte.hu \
    /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.