From owner-freebsd-net@freebsd.org Fri Nov 6 21:15:51 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 00974A2814D for ; Fri, 6 Nov 2015 21:15:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22d.google.com (mail-ig0-x22d.google.com [IPv6:2607:f8b0:4001:c05::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B849D1972; Fri, 6 Nov 2015 21:15:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by igpw7 with SMTP id w7so46687300igp.0; Fri, 06 Nov 2015 13:15:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Wa/UIBmAo1fZqNSbdI19VY6zw+9xoMNhblbSqb6c+10=; b=Cu1Yx9V/jGMvtj0DwBilP8kXlu0u6jz7JWVaaZMOsCrnsd4rlNKgkoK0ydWjMHmcOI Ll7Ur2xFuqe7qeiz/VjPVudi2aHXpnFf6P7kW3hvInaIRej/e3b0tLWj4o9TJ01VX/n4 94VZ+QA1HoEraiy68GFWLwTHFcn2DM5frNTrxq0Trt9PiXEw/rplPHJMTYpgkyjXtfkg hpgb4o+5qOVyw96naRNINOdn0Qo9oEN9qGF7GNGPE4xSroPTGPVttegqjrwkXomq0KpL iWTiwTEEt5GSC4oqTMg6RtDL4mKAa5Hmm6L6Zhit+QHA65LFYXME+YuLEEhkpWWvfz8K NARA== MIME-Version: 1.0 X-Received: by 10.50.178.141 with SMTP id cy13mr10520811igc.61.1446844550283; Fri, 06 Nov 2015 13:15:50 -0800 (PST) Received: by 10.36.217.196 with HTTP; Fri, 6 Nov 2015 13:15:50 -0800 (PST) In-Reply-To: <1446843506.91534.443.camel@freebsd.org> References: <6545444AE21C2749939E637E56594CEA3C0DCCC4@gsp-ex02.ds.swin.edu.au> <5638B7B5.3030802@selasky.org> <6545444AE21C2749939E637E56594CEA3C0DE7FF@gsp-ex02.ds.swin.edu.au> <563B2703.5080402@selasky.org> <6545444AE21C2749939E637E56594CEA3C0E0BD9@gsp-ex02.ds.swin.edu.au> <563C6864.2090907@selasky.org> <563C786C.1050305@selasky.org> <563CC186.9000807@selasky.org> <563CD533.2000909@selasky.org> <1446828229.91534.417.camel@freebsd.org> <563CDA8F.5010901@selasky.org> <563CDBF9.3090800@selasky.org> <1446830585.91534.435.camel@freebsd.org> <1446843506.91534.443.camel@freebsd.org> Date: Fri, 6 Nov 2015 13:15:50 -0800 Message-ID: Subject: Re: Timing issue with Dummynet on high kernel timer interrupt From: Adrian Chadd To: Ian Lepore Cc: Hans Petter Selasky , Luigi Rizzo , Rasool Al-Saadi , "freebsd-net@freebsd.org" , Alexander Motin Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Nov 2015 21:15:51 -0000 On 6 November 2015 at 12:58, Ian Lepore wrote: > On Fri, 2015-11-06 at 11:15 -0800, Adrian Chadd wrote: >> Ideally there'd be both behaviours: >> >> * You'd specify whether a timer/sleep needs to be exact or can >> withstand some jitter (which is what linux provides); and >> * You can communicate to the kernel its aggressiveness for coalescing >> wakeups. >> > > We already implement exactly both of these things (the former in args > to scheduling callouts, the latter in the form of the sysctl I > referenced earlier which lets you set the "agressivness for > coalescing"). > > The problem with the former is very little code actually uses the > flavor of callout scheduling that lets you specify precision. The > problem with the latter is that its default value is to allow enough > deviation that people think the system is misbehaving. Right. What about sleep, though? (eg userland calling sleep, usleep, etc.) Would the original poster problem be fixed just by setting the exact precision? -adrian