From owner-freebsd-net@FreeBSD.ORG Wed Sep 5 07:08:01 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71091106566B; Wed, 5 Sep 2012 07:08:01 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 36DB88FC0A; Wed, 5 Sep 2012 07:08:00 +0000 (UTC) Received: by pbbrp2 with SMTP id rp2so464635pbb.13 for ; Wed, 05 Sep 2012 00:08:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8WdeS6aquuaz75E6TKg0IKoKgJ5WMFyShNeUpu16K9E=; b=INEClLs/FsiCBLn18wWsZ6Mn/V/3riYl2OoIQW6iZZOK3Q/fR93bZjyOUv5DzvgZQ8 TU6SOlQFxLz7HOIT2RthhqpN/guHjnHyvV88WXTtoAMy10au1Gs2fuCTH89ATBSCKlNV eYvmUF7AGoJbuvP6wnpvOzY0wre7mqf+2PDg71jA+CiWnHGhRIsS+Y7lJhYH/dxnALYp S+YoEKrjVOyec0ukVaiIS77RWUS9+8a6obqAHvSo1QKBOgQ1cOv1QbqGFV7tbU0DQ38+ rMH80vsLyH14lh9LJeeNO0LD8UrsGccGhok7Rvk5b5DELRbHyTcPZRWQsf7GHTG9fL3N ulEg== MIME-Version: 1.0 Received: by 10.68.138.169 with SMTP id qr9mr51944629pbb.27.1346828880468; Wed, 05 Sep 2012 00:08:00 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.36.106 with HTTP; Wed, 5 Sep 2012 00:08:00 -0700 (PDT) In-Reply-To: <5040E749.9070200@rdtc.ru> References: <1865271844.20120829131610@serebryakov.spb.ru> <1807373989.20120829223125@serebryakov.spb.ru> <20120830152726.A33776@sola.nimnet.asn.au> <534292400.20120830131158@serebryakov.spb.ru> <20120831180721.GB3208@michelle.cdnetworks.com> <50404957.302@rdtc.ru> <5040508D.9080107@rdtc.ru> <5040DE1D.7040700@rdtc.ru> <5040E749.9070200@rdtc.ru> Date: Wed, 5 Sep 2012 00:08:00 -0700 X-Google-Sender-Auth: fQwhc7zqBYNFMpa9dlx_x8ygwUk Message-ID: From: Adrian Chadd To: Eugene Grosbein Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Cc: pyunyh@gmail.com, freebsd-net@freebsd.org, Lev Serebryakov , Ian Smith Subject: Re: Bad routing performance on 500Mhz Geode LX with CURRENT, ipfw and mpd5 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 07:08:01 -0000 I'm so sorry for dropping off the radar here. Can you please compile your kernel with KTR enabled so we can capture some schedgraph traces? I'd like to let the scheduler people see what's going on. I bet it's something like preemption is allowing the taskqueues to preempt each other (which they shouldn't, not when they're at the same level) when an interrupt occurs that calls taskqueue_enqueue(). On a non-preempt kernel it'll just jump back to running the same thread until yield or tick; on a preempt kernel a driver taskqueue could be preempted by another driver. (Holy crap, this is one situation where maybe the linux spinlock_bh() semantics make sense. If used correctly. Yikes.) Adrian On 31 August 2012 09:33, Eugene Grosbein wrote: > 31.08.2012 22:54, Eugene Grosbein =D0=C9=DB=C5=D4: > >> I've rebuilt by kernel with SCHED_ULE and excluded PREEMPTION. >> Stock driver works without changes in behaviour and driver from HEAD >> now works very similar to old one: LA is not higher than 2 and >> userland is pretty responsive. Also, transfer speed with new driver is >> several percent more. That's good. >> >> Care to explain such dramatic difference for new driver >> with/without PREEMPTION for relatively slow uniprocessor system? >> >>> And run 4BSD + no preemption, try again? > > I've tried 4BSD without preemption too. Can't see any difference > from ULE without preemption. Should I stick with 4BSD for UP system? > > Eugene Grosbein