From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754353Ab3ACWIG (ORCPT ); Thu, 3 Jan 2013 17:08:06 -0500 Received: from webmail.solarflare.com ([12.187.104.25]:44751 "EHLO webmail.solarflare.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754309Ab3ACWIE (ORCPT ); Thu, 3 Jan 2013 17:08:04 -0500 Message-ID: <1357250880.2685.29.camel@bwh-desktop.uk.solarflarecom.com> Subject: Re: [PATCH net-next] softirq: reduce latencies From: Ben Hutchings To: Eric Dumazet CC: David Miller , Andrew Morton , netdev , "linux-kernel@vger.kernel.org" , Tom Herbert Date: Thu, 3 Jan 2013 22:08:00 +0000 In-Reply-To: <1357216132.21409.24107.camel@edumazet-glaptop> References: <1357216132.21409.24107.camel@edumazet-glaptop> Organization: Solarflare Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3 (3.2.3-3.fc16) Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.17.20.137] X-TM-AS-Product-Ver: SMEX-10.0.0.1412-7.000.1014-19504.005 X-TM-AS-Result: No--7.847600-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2013-01-03 at 04:28 -0800, Eric Dumazet wrote: > From: Eric Dumazet > > In various network workloads, __do_softirq() latencies can be up > to 20 ms if HZ=1000, and 200 ms if HZ=100. > > This is because we iterate 10 times in the softirq dispatcher, > and some actions can consume a lot of cycles. > > This patch changes the fallback to ksoftirqd condition to : > > - A time limit of 2 ms. > - need_resched() being set on current task [...] > --- a/kernel/softirq.c > +++ b/kernel/softirq.c [...] > -#define MAX_SOFTIRQ_RESTART 10 > +#define MAX_SOFTIRQ_TIME min(1, (2*HZ/1000)) [...] Really? Never iterate if HZ < 500? Ben. -- Ben Hutchings, Staff Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.