From owner-freebsd-hackers@FreeBSD.ORG Mon Nov 25 21:29:27 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9262EA6E for ; Mon, 25 Nov 2013 21:29:27 +0000 (UTC) Received: from mail-qa0-x235.google.com (mail-qa0-x235.google.com [IPv6:2607:f8b0:400d:c00::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5A2302ACA for ; Mon, 25 Nov 2013 21:29:27 +0000 (UTC) Received: by mail-qa0-f53.google.com with SMTP id j5so7218274qaq.19 for ; Mon, 25 Nov 2013 13:29:26 -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=EIRD2OH7dFAlU8zCLv9mcEqR8+vtRQ/CB5ii/YtZAWw=; b=F/9/ddB0zTtLaGAaCFvY8zFSME9h6YOeQbxrLi6XCKeJ6xCeH7HHvu2AzYjWY9rtXz u1P5iGzPBMUUSZPsT4l9tCKsewqzei7BluswEU5/YdnVo5SsjB8zpyBSba53jE8la7uG 5LV8lY2lgwFx+qeCv7FIkkBzlxYod8AG9AYr/fHVWxwv95tOKgOHF7dKW/htKIcqNKEO 9eELq86vuOWL8lzro/Xotb1vwlDgpS0RiHZcettiUP6RHhAnItOmbPxQEMIczGthhQkW o/iqJkAtCnwclZxpDGQgBkFEj+piGyDXbgV5hUDuVGimP47g4K+fTC51m71yHrTUQU2V R2Ig== MIME-Version: 1.0 X-Received: by 10.224.10.197 with SMTP id q5mr28662865qaq.76.1385414966493; Mon, 25 Nov 2013 13:29:26 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Mon, 25 Nov 2013 13:29:26 -0800 (PST) Date: Mon, 25 Nov 2013 13:29:26 -0800 X-Google-Sender-Auth: X9nT56SaAVmOpP9rLXpw6hqYm-4 Message-ID: Subject: [review request] make sendfile usable from inside the kernel itself From: Adrian Chadd To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Nov 2013 21:29:27 -0000 Hi, http://people.freebsd.org/~adrian/netflix/20131125-sendfile-shuffle-1.diff This moves the copyout to the 'sbytes' field occur _outside_ of vn_sendfile() so vn_sendfile() itself can be called from kernel code. There's likely some more shuffling I have to do with sendfile but this seems like a good, simple starting point. I've done some light testing with some local code to no ill effect. Thanks! -adrian