From patchwork Mon May 22 13:50:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13250605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 591FCC7EE2E for ; Mon, 22 May 2023 13:52:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9203280004; Mon, 22 May 2023 09:52:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E195C900009; Mon, 22 May 2023 09:52:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE15C90000A; Mon, 22 May 2023 09:52:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BE135900009 for ; Mon, 22 May 2023 09:52:11 -0400 (EDT) Received: from smtpin14.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8BF184026D for ; Mon, 22 May 2023 13:52:11 +0000 (UTC) X-FDA: 80818030062.14.BD63084 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf08.hostedemail.com (Postfix) with ESMTP id D54DC160019 for ; Mon, 22 May 2023 13:52:09 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LRyYCHUy; spf=pass (imf08.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684763529; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=HfMcLqK7SdZvPGZvy5b2RGzipVUrB/qFQK+4kiqdRos=; b=pkboapna9dkv4pwq6MPO1dCpC5CGqt4k1RmbuwdmD9tcj9gyIFoyq3tfHY4gyQ/1Hiuddc 7GONCngD/yZUou3xDCJo64ukSyQi9r7ESWXGMBZRVVEZgrFoidzo7MyNQRb0qmw9DunBMd fHo+pxAVNn2XQFbca14v24ldbC3Qfh0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684763529; a=rsa-sha256; cv=none; b=qq8YePEZWL4aAZDeBK5Z5W1Tb9tVY7IavmBsXiaMmJNirmGuLAUQtRijdcOutlPFv+k89B TayFvv3N3ON36zsmXHSAjDnNiaUjQ6Tck9wbMzLIRr7ofURI5ds/gYo0fEa2zX9szW4dAa URvndP6q2ztsFUnLfpU8Qz239krh3Xs= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LRyYCHUy; spf=pass (imf08.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684763529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HfMcLqK7SdZvPGZvy5b2RGzipVUrB/qFQK+4kiqdRos=; b=LRyYCHUyCquNmb69NdXW+xC4OC4Hhwf2Oa0J9O+9SR28Y4mPhunlTwVWBkTsCUYuwZXnvy YJ47Yz7rIJgGTwIGisHP0U7qYIIyTgTcUvn7+0e6i42+fJQaEwCIu73o/kxnJYmz0TL2jX VRsGIAmEY3G6z/u2j8aZxQsAQlY5H+s= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-652-P98tTMU2PTmMkmG9xXy80A-1; Mon, 22 May 2023 09:52:08 -0400 X-MC-Unique: P98tTMU2PTmMkmG9xXy80A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8E383C0BE2D; Mon, 22 May 2023 13:52:06 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.39.192.68]) by smtp.corp.redhat.com (Postfix) with ESMTP id 13CC640C6CD6; Mon, 22 May 2023 13:52:03 +0000 (UTC) From: David Howells To: Jens Axboe , Al Viro , Christoph Hellwig Cc: David Howells , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Christoph Hellwig , Steven Rostedt , Masami Hiramatsu , linux-trace-kernel@vger.kernel.org Subject: [PATCH v22 26/31] trace: Convert trace/seq to use copy_splice_read() Date: Mon, 22 May 2023 14:50:13 +0100 Message-Id: <20230522135018.2742245-27-dhowells@redhat.com> In-Reply-To: <20230522135018.2742245-1-dhowells@redhat.com> References: <20230522135018.2742245-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Rspamd-Queue-Id: D54DC160019 X-Rspam-User: X-Stat-Signature: xjr1835uxohp731pxr9mze8ha9pet5fn X-Rspamd-Server: rspam03 X-HE-Tag: 1684763529-983496 X-HE-Me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D21IeT86Ml4CICLbLRTh6fkRdWRvTZiUlyzG/MGi4f8vL0AUQW2ecfTwTTyWlVTpPo2XH5aMFTPQfQvZBqLtVvrdH97NlLklmbIpDBrNAdm4AexkmI/pkw6o62EbS+NKz3kopi6ct2RfQ3TE7/+0fmn23TftX61b40lkiHRhLalqHRZ6TN5XnK2Ob5OMN1ALGCPUkooz2OmSAMS/2rH3HDYE8D0zCLceMyWipO2b3yQBt5P4sCDUoN4dOFCwoxOKuNy8alAKOowkBLJBf49ydLMXhUMweDgGUDMi+CDvh02ybUQ5sOvTNx1KkM3Uhx9jMcvCTIeeAiCgJ4mWK04hBn2cQTnKLblBmamkKZbMVqD+yqGEWXpixEo= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: For the splice from the trace seq buffer, just use copy_splice_read(). In the future, something better can probably be done by gifting pages from seq->buf into the pipe, but that would require changing seq->buf into a vmap over an array of pages. Signed-off-by: David Howells cc: Christoph Hellwig cc: Al Viro cc: Jens Axboe cc: Steven Rostedt cc: Masami Hiramatsu cc: linux-kernel@vger.kernel.org cc: linux-trace-kernel@vger.kernel.org cc: linux-fsdevel@vger.kernel.org cc: linux-block@vger.kernel.org cc: linux-mm@kvack.org --- kernel/trace/trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index ebc59781456a..c210d02fac97 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -5171,7 +5171,7 @@ static const struct file_operations tracing_fops = { .open = tracing_open, .read = seq_read, .read_iter = seq_read_iter, - .splice_read = generic_file_splice_read, + .splice_read = copy_splice_read, .write = tracing_write_stub, .llseek = tracing_lseek, .release = tracing_release,