From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Daniel Schmitt <pnambic@unu.nu>,
netfilter-devel@lists.netfilter.org,
linux-kernel <linux-kernel@vger.kernel.org>,
"K.R. Foley" <kr@cybsft.com>, Lee Revell <rlrevell@joe-job.com>,
Mark_H_Johnson@raytheon.com,
alsa-devel <alsa-devel@lists.sourceforge.net>,
Felipe Alfaro Solana <lkml@felipe-alfaro.com>
Subject: Re: [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8
Date: Fri, 03 Sep 2004 11:10:30 +1000 [thread overview]
Message-ID: <1094126377.16999.49.camel@bach> (raw)
In-Reply-To: <20040902074604.GA21144@elte.hu>
On Thu, 2004-09-02 at 17:46, Ingo Molnar wrote:
> Rusty, what's going on in this code?
Good question! Not my code, fortunately...
> #1: we kmalloc(GFP_KERNEL) with a spinlock held and softirqs off - ouch!
>
> #2: why does it do the kmalloc() anyway? It could store the position in
> the seq pointer just fine. No need to alloc an integer pointer to
> store the value in ...
>
> #3: to fix the latency, ct_seq_show() could take the ip_conntrack_lock
> and could check the current index against ip_conntrack_htable_size.
> There's not much point in making this non-preemptible, there's
> a 4K granularity anyway.
The code tries to put an entire hash bucket into a single seq_read().
That's not going to work if the hash is really deep. On the other hand,
not much will, and it's simple.
The lock is only needed on traversing: htable_size can't change after
init anyway, so it should be done in ct_seq_show.
Fix should be fairly simple...
Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell
WARNING: multiple messages have this Message-ID (diff)
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Lee Revell <rlrevell@joe-job.com>,
Mark_H_Johnson@raytheon.com, "K.R. Foley" <kr@cybsft.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Felipe Alfaro Solana <lkml@felipe-alfaro.com>,
Daniel Schmitt <pnambic@unu.nu>,
alsa-devel <alsa-devel@lists.sourceforge.net>,
netfilter-devel@lists.netfilter.org
Subject: Re: [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8
Date: Fri, 03 Sep 2004 11:10:30 +1000 [thread overview]
Message-ID: <1094126377.16999.49.camel@bach> (raw)
In-Reply-To: <20040902074604.GA21144@elte.hu>
On Thu, 2004-09-02 at 17:46, Ingo Molnar wrote:
> Rusty, what's going on in this code?
Good question! Not my code, fortunately...
> #1: we kmalloc(GFP_KERNEL) with a spinlock held and softirqs off - ouch!
>
> #2: why does it do the kmalloc() anyway? It could store the position in
> the seq pointer just fine. No need to alloc an integer pointer to
> store the value in ...
>
> #3: to fix the latency, ct_seq_show() could take the ip_conntrack_lock
> and could check the current index against ip_conntrack_htable_size.
> There's not much point in making this non-preemptible, there's
> a 4K granularity anyway.
The code tries to put an entire hash bucket into a single seq_read().
That's not going to work if the hash is really deep. On the other hand,
not much will, and it's simple.
The lock is only needed on traversing: htable_size can't change after
init anyway, so it should be done in ct_seq_show.
Fix should be fairly simple...
Rusty.
--
Anyone who quotes me in their signature is an idiot -- Rusty Russell
next prev parent reply other threads:[~2004-09-03 1:10 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 19:13 [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5 Mark_H_Johnson
2004-08-30 19:21 ` Ingo Molnar
2004-09-01 12:31 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5 - netdev_max_back_log is too small P.O. Gaillard
2004-09-01 13:05 ` Ingo Molnar
2004-09-02 11:24 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q6 - network is no longer smooth P.O. Gaillard
2004-09-02 11:28 ` Ingo Molnar
2004-09-02 15:26 ` P.O. Gaillard
2004-08-31 8:49 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q5 Ingo Molnar
2004-09-02 6:33 ` Ingo Molnar
2004-09-02 6:55 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8 Ingo Molnar
2004-09-02 7:04 ` Lee Revell
2004-09-02 7:15 ` Ingo Molnar
2004-09-02 7:31 ` Lee Revell
2004-09-02 7:46 ` Ingo Molnar
2004-09-03 1:10 ` Rusty Russell [this message]
2004-09-03 1:10 ` Rusty Russell
2004-09-02 23:25 ` Lee Revell
2004-09-02 23:28 ` Ingo Molnar
2004-09-02 23:32 ` Lee Revell
2004-09-02 7:17 ` Ingo Molnar
2004-09-02 8:23 ` Ingo Molnar
2004-09-02 11:10 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-Q9 Ingo Molnar
2004-09-02 12:14 ` Thomas Charbonnel
2004-09-02 13:16 ` Thomas Charbonnel
2004-09-02 13:23 ` Ingo Molnar
2004-09-02 14:38 ` Thomas Charbonnel
2004-09-02 21:57 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R0 Ingo Molnar
2004-09-02 22:06 ` Lee Revell
2004-09-02 22:14 ` Ingo Molnar
2004-09-02 22:15 ` Lee Revell
2004-09-03 0:24 ` Lee Revell
2004-09-03 3:17 ` Eric St-Laurent
2004-09-03 6:26 ` Lee Revell
2004-09-03 6:36 ` Ingo Molnar
2004-09-03 6:49 ` Lee Revell
2004-09-03 7:01 ` Ingo Molnar
2004-09-03 7:05 ` Ingo Molnar
2004-09-03 7:40 ` Lee Revell
2004-09-03 7:50 ` Free Ekanayaka
2004-09-03 8:05 ` Lee Revell
2004-09-03 9:05 ` Free Ekanayaka
2004-09-03 9:25 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R1 Ingo Molnar
2004-09-03 9:50 ` Luke Yelavich
2004-09-03 10:29 ` Ingo Molnar
2004-09-03 10:43 ` Luke Yelavich
2004-09-03 11:33 ` Thomas Charbonnel
2004-09-03 11:49 ` Ingo Molnar
2004-09-03 12:05 ` Thomas Charbonnel
2004-09-03 16:14 ` Thomas Charbonnel
2004-09-03 17:36 ` Thomas Charbonnel
2004-09-03 11:36 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R2 Ingo Molnar
2004-09-03 8:09 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R0 Luke Yelavich
2004-09-03 8:13 ` Lee Revell
2004-09-03 8:21 ` Luke Yelavich
2004-09-03 12:52 ` Luke Yelavich
2004-09-03 18:09 ` K.R. Foley
2004-09-03 11:04 ` K.R. Foley
2004-09-03 17:02 ` K.R. Foley
2004-09-03 20:40 ` Lee Revell
2004-09-03 17:10 ` K.R. Foley
2004-09-03 18:17 ` Ingo Molnar
2004-09-03 18:36 ` K.R. Foley
2004-09-03 19:30 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R3 Ingo Molnar
2004-09-03 19:49 ` K.R. Foley
2004-09-04 3:39 ` K.R. Foley
2004-09-04 3:43 ` K.R. Foley
2004-09-04 6:41 ` Ingo Molnar
2004-09-04 12:28 ` K.R. Foley
2004-09-04 8:57 ` Ingo Molnar
2004-09-04 10:16 ` Lee Revell
2004-09-04 14:35 ` K.R. Foley
2004-09-04 20:05 ` Ingo Molnar
2004-09-03 18:39 ` [patch] voluntary-preempt-2.6.9-rc1-bk4-R0 Ingo Molnar
2004-09-03 18:41 ` K.R. Foley
-- strict thread matches above, loose matches on Subject: below --
2004-09-02 7:57 [patch] voluntary-preempt-2.6.9-rc1-bk4-Q8 mika.penttila
2004-09-02 8:32 ` Ingo Molnar
2004-09-02 9:06 ` Peter Zijlstra
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=1094126377.16999.49.camel@bach \
--to=rusty@rustcorp.com.au \
--cc=Mark_H_Johnson@raytheon.com \
--cc=alsa-devel@lists.sourceforge.net \
--cc=kr@cybsft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml@felipe-alfaro.com \
--cc=mingo@elte.hu \
--cc=netfilter-devel@lists.netfilter.org \
--cc=pnambic@unu.nu \
--cc=rlrevell@joe-job.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 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.