From patchwork Thu Aug 9 12:31:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro YUNOMAE X-Patchwork-Id: 176073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 5A3B52C00CF for ; Thu, 9 Aug 2012 22:32:13 +1000 (EST) Received: from localhost ([::1]:36184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzRuN-0001kk-Cd for incoming@patchwork.ozlabs.org; Thu, 09 Aug 2012 08:32:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzRtd-0008Ud-7l for qemu-devel@nongnu.org; Thu, 09 Aug 2012 08:31:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzRtc-0004vf-5p for qemu-devel@nongnu.org; Thu, 09 Aug 2012 08:31:25 -0400 Received: from mail7.hitachi.co.jp ([133.145.228.42]:41895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzRtb-0004uw-Mi for qemu-devel@nongnu.org; Thu, 09 Aug 2012 08:31:24 -0400 Received: from mlsv5.hitachi.co.jp (unknown [133.144.234.166]) by mail7.hitachi.co.jp (Postfix) with ESMTP id E33F437AC3; Thu, 9 Aug 2012 21:31:22 +0900 (JST) Received: from mfilter03.hitachi.co.jp by mlsv5.hitachi.co.jp (8.13.1/8.13.1) id q79CVMZj018112; Thu, 9 Aug 2012 21:31:22 +0900 Received: from vshuts4.hitachi.co.jp (vshuts4.hitachi.co.jp [10.201.6.80]) by mfilter03.hitachi.co.jp (Switch-3.3.4/Switch-3.3.4) with ESMTP id q79CVLJn009045; Thu, 9 Aug 2012 21:31:22 +0900 X-AuditID: b753bd60-932c5ba0000047ca-a3-5023ad991478 Received: from hsdlmain.sdl.hitachi.co.jp (unknown [133.144.14.194]) by vshuts4.hitachi.co.jp (Symantec Mail Security) with ESMTP id 300AF2043CD; Thu, 9 Aug 2012 21:31:21 +0900 (JST) Received: from hsdlvgate2.sdl.hitachi.co.jp by hsdlmain.sdl.hitachi.co.jp (8.13.8/3.7W11021512) id q79CVLSE010671; Thu, 9 Aug 2012 21:31:21 +0900 X-AuditID: b753bd60-932c5ba0000047ca-a3-5023ad991478 Received: from sdl99w.sdl.hitachi.co.jp (sdl99w.sdl.hitachi.co.jp [133.144.14.250]) by hsdlvgate2.sdl.hitachi.co.jp (Symantec Mail Security) with ESMTP id A952B236561; Thu, 9 Aug 2012 21:31:20 +0900 (JST) Received: from maild.sdl.hitachi.co.jp (sdl99d.sdl.hitachi.co.jp [133.144.14.199]) by sdl99w.sdl.hitachi.co.jp (Postfix) with ESMTP id 48CDA53C158; Thu, 9 Aug 2012 21:31:21 +0900 (JST) Received: from ltc189.sdl.hitachi.co.jp (unknown [10.232.28.60]) by maild.sdl.hitachi.co.jp (Postfix) with ESMTP id A24E0495B83; Thu, 9 Aug 2012 21:31:20 +0900 (JST) From: Yoshihiro YUNOMAE To: linux-kernel@vger.kernel.org Date: Thu, 09 Aug 2012 21:31:10 +0900 Message-ID: <20120809123110.8542.99098.stgit@ltc189.sdl.hitachi.co.jp> In-Reply-To: <20120809123029.8542.38311.stgit@ltc189.sdl.hitachi.co.jp> References: <20120809123029.8542.38311.stgit@ltc189.sdl.hitachi.co.jp> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 X-Brightmail-Tracker: AAAAAA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 133.145.228.42 Cc: Herbert Xu , Arnd Bergmann , Frederic Weisbecker , Rusty Russell , qemu-devel@nongnu.org, Borislav Petkov , virtualization@lists.linux-foundation.org, Masami Hiramatsu , "Franch Ch. Eigler" , Ingo Molnar , Mathieu Desnoyers , Steven Rostedt , Anthony Liguori , Greg Kroah-Hartman , Amit Shah , yrl.pp-manager.tt@hitachi.com Subject: [Qemu-devel] [PATCH V2 4/6] ftrace: Allow stealing pages from pipe buffer X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Masami Hiramatsu Use generic steal operation on pipe buffer to allow stealing ring buffer's read page from pipe buffer. Note that this could reduce the performance of splice on the splice_write side operation without affinity setting. Since the ring buffer's read pages are allocated on the tracing-node, but the splice user does not always execute splice write side operation on the same node. In this case, the page will be accessed from the another node. Thus, it is strongly recommended to assign the splicing thread to corresponding node. Signed-off-by: Masami Hiramatsu Acked-by: Steven Rostedt --- kernel/trace/trace.c | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index a120f98..ae01930 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -4194,12 +4194,6 @@ static void buffer_pipe_buf_release(struct pipe_inode_info *pipe, buf->private = 0; } -static int buffer_pipe_buf_steal(struct pipe_inode_info *pipe, - struct pipe_buffer *buf) -{ - return 1; -} - static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { @@ -4215,7 +4209,7 @@ static const struct pipe_buf_operations buffer_pipe_buf_ops = { .unmap = generic_pipe_buf_unmap, .confirm = generic_pipe_buf_confirm, .release = buffer_pipe_buf_release, - .steal = buffer_pipe_buf_steal, + .steal = generic_pipe_buf_steal, .get = buffer_pipe_buf_get, };