From owner-freebsd-current@FreeBSD.ORG Thu Dec 12 20:41:37 2013 Return-Path: Delivered-To: freebsd-current@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 CDDF1337; Thu, 12 Dec 2013 20:41:37 +0000 (UTC) Received: from mail-qa0-x230.google.com (mail-qa0-x230.google.com [IPv6:2607:f8b0:400d:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7F19C1660; Thu, 12 Dec 2013 20:41:37 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id w5so109360qac.14 for ; Thu, 12 Dec 2013 12:41:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=Wbu08uSJUAyCMZVWkFPJcDcXkI1aZemhBs9NsXbawg8=; b=Zb6vBdVrpVzyVAGsCtyY7Bnc/Q1ZrTPmvKJ+GsMz/mhZNzkyCMOVqQ81PEBIUNtn77 qIo+Nn2qN1AGmv8iK6osWHdETmsbJz3S+48O11ncR61IlGEy4Gp9on19jJeKYGdPz/PS d+Bg+6/BL9gjaQxdQZGID/xW2fVFHzDi/zpLbMLDYRrPkP8YYA4zx/nrW/yf/8P+2li9 mFPFDx86/cgL2uHJ/Z5KhRQymyleNDKf4uDFVxrGiwIQv0fVsWOTRueevSqj82uemZxm 96C067XOqWVrFuGGrtScSuWXJUicR/ijnFxgTUIqJyB4ZgS2pprfn0UeRKi0FQnfgIF3 19dw== MIME-Version: 1.0 X-Received: by 10.224.50.195 with SMTP id a3mr15839247qag.25.1386880896643; Thu, 12 Dec 2013 12:41:36 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Thu, 12 Dec 2013 12:41:36 -0800 (PST) Date: Thu, 12 Dec 2013 12:41:36 -0800 X-Google-Sender-Auth: lf4nKGruO1FcFSSzD-JNDf_ar48 Message-ID: Subject: 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-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Dec 2013 20:41:37 -0000 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