From patchwork Sat May 20 00:00:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Howells X-Patchwork-Id: 13249007 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 21872C77B7F for ; Sat, 20 May 2023 00:02:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 581B8280013; Fri, 19 May 2023 20:02:23 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 507E2280001; Fri, 19 May 2023 20:02:23 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 30D3F280013; Fri, 19 May 2023 20:02:23 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1CB8E280001 for ; Fri, 19 May 2023 20:02:23 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E69611A0A8F for ; Sat, 20 May 2023 00:02:22 +0000 (UTC) X-FDA: 80808681324.21.CA19EA9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf22.hostedemail.com (Postfix) with ESMTP id 143D6C000D for ; Sat, 20 May 2023 00:02:20 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=alx87H68; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684540941; 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=tht2OsWiKVLlnWKWvcKWWf0XrgSLfxkxMIb49q7XAIqy9/eOrvGekokg4t/jTR2gX6l91F kMkjQKdpUZrro08AbnRfOwy7ElFdwJtX4JzCJ260b2OHnnGyyZaqe5dF6ecZ6bl5DAZbNT NM1a/MlUzbIEnq2dEX3XT0GFVl8EMfQ= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=alx87H68; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf22.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684540941; a=rsa-sha256; cv=none; b=Q1/AnsDQNiq/DvtjKkBKwzbwey25Lg53DnTLgqqDcILmc9llAAcHHAYKd6IztOkK48bsIp Q44j/SCfcYr8ijFuxgYxl4diEuGhm/5vPoxqGupXMUiQnx8+coSwz4XpHlaj8sLRqtZ/Os uvFciVLaftmtD2GLRHBUlRiDdfNopPo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684540940; 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=alx87H68eZJK6XpZww3vALmUAFA8/FeftuqTBKFheS89v/drgUzGvLE5+0FQiCkLASm+uh kiXtwndQrNX3OKreGndjIxMXCE+BmtszJg2kSPG44XQoco0kkbTu0L1VTB2FoT/UIEBL/O lCc4sQ79qMV7qXiMpZF2kF1hUBONKtI= 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-146-uJgBlECTNdOvDKp9eNps_A-1; Fri, 19 May 2023 20:02:15 -0400 X-MC-Unique: uJgBlECTNdOvDKp9eNps_A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 35A573C02521; Sat, 20 May 2023 00:02:14 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id E51177C2A; Sat, 20 May 2023 00:02:11 +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 v21 26/30] splice: Convert trace/seq to use copy_splice_read() Date: Sat, 20 May 2023 01:00:45 +0100 Message-Id: <20230520000049.2226926-27-dhowells@redhat.com> In-Reply-To: <20230520000049.2226926-1-dhowells@redhat.com> References: <20230520000049.2226926-1-dhowells@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 143D6C000D X-Stat-Signature: us63ez6khkm88jqkg5bnqmx5emrgdin3 X-Rspam-User: X-HE-Tag: 1684540940-962234 X-HE-Meta: U2FsdGVkX1+l9e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ed7P6EnC7KWP4iE9k2w+62+Gf2E/QN3nw8sBn6WSX9KDEv2Ty8AcGUDg4rh7pptUDuekNdUwNJfAy4AD/8mwJ6r5xJXMgaFCHknFMukn82p8iwFct4cOZT3Ve+yXpoyVizaRnQu2Q2p5ia8ThzUKUkGV/Q3aoSvUbGGFxnVzszpYzixJ8XwIDj/EUjk7i2kAURfP88oSk087Z+xt6y/oEbNka2ZYNOWDQC8X8+fWaBcEWdsVqOt1Pt0K2FnPm48rBvTYUwvh+S2QJCppwZ2+TSkjkjDCw7V5kdoxjlhSApwBEO+1nT9ayvUYroYumHkpebsB570/8rBIKVyE8V2qTG+HE34zoDVobUG8Lx9ynlyFhmtKbiRJs= 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 Acked-by: Steven Rostedt (Google) --- 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,