From patchwork Tue Jul 24 02:37:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro YUNOMAE X-Patchwork-Id: 172778 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 9E3C82C0086 for ; Tue, 24 Jul 2012 12:53:22 +1000 (EST) Received: from localhost ([::1]:44121 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StV11-00053i-Jh for incoming@patchwork.ozlabs.org; Mon, 23 Jul 2012 22:38:27 -0400 Received: from eggs.gnu.org ([208.118.235.92]:46833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StV0U-0003ho-JD for qemu-devel@nongnu.org; Mon, 23 Jul 2012 22:37:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1StV0T-0008WE-Cb for qemu-devel@nongnu.org; Mon, 23 Jul 2012 22:37:54 -0400 Received: from mail4.hitachi.co.jp ([133.145.228.5]:34346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1StV0S-0008W0-Sq for qemu-devel@nongnu.org; Mon, 23 Jul 2012 22:37:53 -0400 Received: from mlsv2.hitachi.co.jp (unknown [133.144.234.166]) by mail4.hitachi.co.jp (Postfix) with ESMTP id 7697E33CCA; Tue, 24 Jul 2012 11:37:51 +0900 (JST) Received: from mfilter03.hitachi.co.jp by mlsv2.hitachi.co.jp (8.13.1/8.13.1) id q6O2bpVD016908; Tue, 24 Jul 2012 11:37:51 +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 q6O2boSc010095; Tue, 24 Jul 2012 11:37:50 +0900 X-AuditID: b753bd60-914c2ba0000047ca-d5-500e0a7d0f88 Received: from hsdlmain.sdl.hitachi.co.jp (unknown [133.144.14.194]) by vshuts4.hitachi.co.jp (Symantec Mail Security) with ESMTP id AE56B2043D2; Tue, 24 Jul 2012 11:37:49 +0900 (JST) Received: from hsdlvgate2.sdl.hitachi.co.jp by hsdlmain.sdl.hitachi.co.jp (8.13.8/3.7W11021512) id q6O2bnlB028105; Tue, 24 Jul 2012 11:37:49 +0900 X-AuditID: b753bd60-914c2ba0000047ca-d5-500e0a7d0f88 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 5AC42236561; Tue, 24 Jul 2012 11:37:48 +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 EBC9F53C1FA; Tue, 24 Jul 2012 11:37:48 +0900 (JST) Received: from ltc189.sdl.hitachi.co.jp (unknown [10.232.28.60]) by maild.sdl.hitachi.co.jp (Postfix) with ESMTP id AD31B495B93; Tue, 24 Jul 2012 11:37:48 +0900 (JST) From: Yoshihiro YUNOMAE To: linux-kernel@vger.kernel.org Date: Tue, 24 Jul 2012 11:37:38 +0900 Message-ID: <20120724023738.6600.59837.stgit@ltc189.sdl.hitachi.co.jp> In-Reply-To: <20120724023657.6600.52706.stgit@ltc189.sdl.hitachi.co.jp> References: <20120724023657.6600.52706.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.5 Cc: Herbert Xu , Arnd Bergmann , Frederic Weisbecker , yrl.pp-manager.tt@hitachi.com, 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 Subject: [Qemu-devel] [RFC PATCH 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 Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: Ingo Molnar 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, };