[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1271683627.3845.44.camel@edumazet-laptop>
Date: Mon, 19 Apr 2010 15:27:07 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Changli Gao <xiaosuo@...il.com>
Cc: Tom Herbert <therbert@...gle.com>,
David Miller <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>
Subject: Re: [RFC] rps: shortcut net_rps_action()
Le lundi 19 avril 2010 à 20:28 +0800, Changli Gao a écrit :
> On Mon, Apr 19, 2010 at 8:14 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> >
> > As several packets can be enqueued for a given cpu, we would need to
> > keep bitmasks.
> > We would have to add one test in enqueue_to_backlog()
> >
> > if (cpu_test_and_set(cpu, mask)) {
> > __raise_softirq_irqoff(NET_RX_SOFTIRQ);
> > array[nb++] = cpu;
> > }
>
> rps_lock(queue);
> if (queue->input_pkt_queue.qlen <= netdev_max_backlog) {
> if (queue->input_pkt_queue.qlen) {
> ...
> if (napi_schedule_prep(&queue->backlog)) {
> #ifdef CONFIG_RPS
> if (cpu != smp_processor_id()) {
> struct rps_remote_softirq_cpus *rcpus =
> &__get_cpu_var(rps_remote_softirq_cpus);
>
> cpu_set(cpu, rcpus->mask[rcpus->select]);
> __raise_softirq_irqoff(NET_RX_SOFTIRQ);
> goto enqueue;
> }
> #endif
> __napi_schedule(&queue->backlog);
> }
>
> Only the first packet of a softnet.input_pkt_queue may trigger IPI, so
> we don't need to keep bitmasks.
>
This is not true Changli
Please read again all previous mails about RPS, or the code.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists