From owner-freebsd-arch@FreeBSD.ORG Thu Dec 12 20:45:17 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30847838; Thu, 12 Dec 2013 20:45:17 +0000 (UTC) Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com [IPv6:2607:f8b0:400d:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D2DA11726; Thu, 12 Dec 2013 20:45:16 +0000 (UTC) Received: by mail-qa0-f43.google.com with SMTP id ii20so117460qab.2 for ; Thu, 12 Dec 2013 12:45:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=kgcFDTHekBRsotEm60Yqps8P7YBX9zCvKs7S5b22c3I=; b=lEqcFvMsdEQAkd76NflEkZi4kSY0hlgxbAZUpuskHHeQY4o336z9EGBBZESHoa6k+u YBGuo0ZnXuZ7jcCF0y9h2+Uxi93Hs0+JnCLAYuwjhz4gdNnDennp7xgIKIspamli2UrQ bOiPGbPMBjDqLa9Q4xowCsLvz5i6sAAczSFDNN4BnKRagFmLbAqx/dBAxqwTICQRTHSg RV1Q/l9TB2qVWuNI0omfYLvs5oZ1eW7vla/G4eh3pp2sRct0zRDS30miyEy1bnwkHMkU hmN1X3txtTpvc2kZN0oCq05qStpj7T6FTyZQIKIIXiY4NopeWKjEs3TUm9wWOvcl8822 MmNQ== MIME-Version: 1.0 X-Received: by 10.224.80.129 with SMTP id t1mr9628851qak.95.1386881115845; Thu, 12 Dec 2013 12:45:15 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Thu, 12 Dec 2013 12:45:15 -0800 (PST) In-Reply-To: References: Date: Thu, 12 Dec 2013 12:45:15 -0800 X-Google-Sender-Auth: 5SlNet_u6767tqGcwJtWUpsLyAQ Message-ID: Subject: Re: review request: sendfile kqueue notification From: Adrian Chadd To: "freebsd-arch@freebsd.org" , freebsd-current Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 20:45:17 -0000 And yes, I know this breaks the 32 bit compat sendfile call. I'm thinking of how to fix this without just duplicating all of that code. Thanks, -a On 12 December 2013 12:41, Adrian Chadd wrote: > Hi, > > I'd like to start committing this to FreeBSD-HEAD: > > http://people.freebsd.org/~adrian/netflix/20131211-sendfile-kqueue-11.diff > > It implements kqueue notifications for sendfile so users can get an > asynchronous notification that the underlying mbufs have been freed. > This allows userland users of sendfile to know that the underlying > memory / file object can be recycled or overwritten. Right now the > only way to do this is to set SF_SYNC and this causes sendfile() to > sleep until the transaction is complete and the mbufs have been freed. > > I've been testing this out locally in my lab environment and it's > running flawlessly at 30gbit/sec of TCP across 32,768 active > transmitting sockets. > > I'd like to start merging this into -HEAD in small pieces to make it > easier to MFC to -10. > > Thanks! > > > > -adrian