From mboxrd@z Thu Jan 1 00:00:00 1970 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 62B6BEB64DA for ; Fri, 7 Jul 2023 20:46:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AECA56B0072; Fri, 7 Jul 2023 16:46:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A9BA06B0074; Fri, 7 Jul 2023 16:46:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 964C48D0001; Fri, 7 Jul 2023 16:46:12 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 849536B0072 for ; Fri, 7 Jul 2023 16:46:12 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 5F8B640140 for ; Fri, 7 Jul 2023 20:46:10 +0000 (UTC) X-FDA: 80985998100.20.CA8346B Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) by imf07.hostedemail.com (Postfix) with ESMTP id 295C140012 for ; Fri, 7 Jul 2023 20:46:07 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=lkuqLxF1; spf=pass (imf07.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=ndesaulniers@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688762768; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0aYVMvYe1G1Ct9F0r9UZVqRVY35bvxFcxuMPw9DOHvw=; b=72QyDLVM675+wNwJsOcXh+4HG6v57nK/PdXoBRRvXckrbjx7zGY0pmYnhK7iAI/g0r72HR aWRx2T6VjkU7vOG9cGo1Wrt2B5OoWkWfmYrfcTpWsE9PUkJLJhZr/EjzpTE70fmZDeqgKq P2Y8Lu/VL+P8F7G70eHnC8zDBxDU7gI= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=lkuqLxF1; spf=pass (imf07.hostedemail.com: domain of ndesaulniers@google.com designates 209.85.222.171 as permitted sender) smtp.mailfrom=ndesaulniers@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1688762768; a=rsa-sha256; cv=none; b=oPKhQ+RoPoozhkhRbKjOLcpDPkHCTgeKofHjwTLXMTq8JeEMcYYvzXICB0oAuE9GGAMKYz NgzfQJmZaHJ/it26rQU0fLys+Br9OinlknNBv7m2M+FStyTwHSLK+R7TGSM9YALhKqbUo7 hmWvoaUKw4fZUBkTWfVcmpM6ktPygGU= Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-7659db6339eso117326185a.1 for ; Fri, 07 Jul 2023 13:46:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1688762767; x=1691354767; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0aYVMvYe1G1Ct9F0r9UZVqRVY35bvxFcxuMPw9DOHvw=; b=lkuqLxF14A/w/d+fV/ttf+K3Ub3mN4dsNqaNLTsP+ZDcGTajiX2EvRqyzkSjnpw90h 2/kSM88bqsMjXMcVJVwmaRQGqOm4/nSCxcUal0Du0s8hegtUlJy/KdIPSt3tU5D0lEw0 WN36Zgo/31PlXBRBCDW4zoA6ZdCUY76aH/bC14sD01W8wnDCdG9bYPTUABJxt5CYePd+ lDwNBBGzo8oQPeOZ7xteUlOayvMdyzlP9mBMsp2tPYiyDWDygUa0ybaVaKei63uKBEih 5lPTF8ShwuPVLnHlcCIXQLPBhagZJxmmubKJEEIZbSH7Snzkbfqr4uNsd1A2DxzC8zKa yTaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688762767; x=1691354767; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0aYVMvYe1G1Ct9F0r9UZVqRVY35bvxFcxuMPw9DOHvw=; b=cohBzpq6JKKUT8pVOpMwZn746iaMFJ9aokMvjL7UxJ+j2jg7wqlRhslcASu+8ALzQc kZFk6jL3rZx+XAnf++FAMkaVDcnMWlOKsaHk1+EKCdmTTH0tdcjvQzMaslrQ03ey5eNR ZttKknjnq9JlwXT6UaGfke/zzbwVhj+YqeKOE2p/EI39dtoKESjZwYsypMeKUI2XI/r9 7Uw69Ew9YBi5Z6GJAVTMoP4CpzRybny4ryCON6BFyjDEJCDEc8rOW9c860nKg/l0X4P2 wt029NaFmDuivFVfT354G6LQ29MxE6QmvTBeYEF4JZ99HWqhlaSWZtf0TGKcmXrK7vSu etmg== X-Gm-Message-State: ABy/qLZI/Xq4DQWvsS2b8LZHQcM7JKVxcxQ6+cgV0ZsbEdjXzgjR4RuV chvXwsjFoG9yC9QBBdFZFW3SmbK3NGtgCDvPbLKwjw== X-Google-Smtp-Source: APBJJlHUf0rmBIyOI/T2pORO24BydSGObRtEeKTOwPbRW6TmxkjVJRfSahixaV1hd2/4VLJVPsq9WGAU0WIhQb6nXas= X-Received: by 2002:a05:620a:2687:b0:765:449d:1397 with SMTP id c7-20020a05620a268700b00765449d1397mr10632093qkp.13.1688762767012; Fri, 07 Jul 2023 13:46:07 -0700 (PDT) MIME-Version: 1.0 References: <253mt0il43o.fsf@mtr-vdi-124.i-did-not-set--mail-host-address--so-tickle-me> <20230620145338.1300897-1-dhowells@redhat.com> <20230620145338.1300897-11-dhowells@redhat.com> <58466.1688074499@warthog.procyon.org.uk> <20230629164318.44f45caf@kernel.org> <20230630161043.GA2902645@dev-arch.thelio-3990X> <20230630091442.172ec67f@kernel.org> <20230630192825.GA2745548@dev-arch.thelio-3990X> In-Reply-To: <20230630192825.GA2745548@dev-arch.thelio-3990X> From: Nick Desaulniers Date: Fri, 7 Jul 2023 13:45:55 -0700 Message-ID: Subject: Re: [PATCH net-next v3 10/18] nvme/host: Use sendmsg(MSG_SPLICE_PAGES) rather then sendpage To: Nathan Chancellor Cc: Jakub Kicinski , David Howells , Aurelien Aptel , netdev@vger.kernel.org, Alexander Duyck , "David S. Miller" , Eric Dumazet , Paolo Abeni , Willem de Bruijn , David Ahern , Matthew Wilcox , Jens Axboe , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Sagi Grimberg , Willem de Bruijn , Keith Busch , Jens Axboe , Christoph Hellwig , Chaitanya Kulkarni , linux-nvme@lists.infradead.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 295C140012 X-Rspam-User: X-Stat-Signature: qyffxb7f5gi79a5buaeo1jrayfcjkra6 X-Rspamd-Server: rspam01 X-HE-Tag: 1688762767-244417 X-HE-Meta: U2FsdGVkX18auD2LNknBpneI0/UcoINR1PnMb/w6zw/XhExELLCyv3A9e1GiXLGiEkxRmn2POTPmwaY/oYuzoZXLVWfpURYGKkeqb22yt62DnUoUPYas9eLBQ8e5k0w4DtNd4WUyPjPurM6RQKINWygwOFaEQ1GxH9IyUE1WJi6Zg4zufjliDU3naFZkspvNmjfmym4TQfjfIyDdhW5LninflcaS0gbNxSIGzn7RSbW3geUkcNHC5hQEhbXxQNIeVKsSeaKVRoKFM+E/Whb4QsyUhKOxlWHdFA1WuNgiLN8Vf+PW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LMcZRRJJ8jbYQ2kA2+yCtvdv96Kvo2l5jCtQlmbiqv6dq+94W/FV1fbP4myy8PS9EsWUadGsJgdvKkDj3jGEoJ0+b3otLpuUFkrTk3UWF4= 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: On Fri, Jun 30, 2023 at 12:28=E2=80=AFPM Nathan Chancellor wrote: > > On Fri, Jun 30, 2023 at 09:14:42AM -0700, Jakub Kicinski wrote: > > On Fri, 30 Jun 2023 09:10:43 -0700 Nathan Chancellor wrote: > > > > Let me CC llvm@ in case someone's there is willing to make > > > > the compiler warn about this. > > > > > > Turns out clang already has a warning for this, -Wcomma: > > > > > > drivers/nvme/host/tcp.c:1017:38: error: possible misuse of comma op= erator here [-Werror,-Wcomma] > > > 1017 | msg.msg_flags &=3D ~MSG_SPLICE_PAGE= S, > > > | ^ > > > drivers/nvme/host/tcp.c:1017:4: note: cast expression to void to si= lence warning > > > 1017 | msg.msg_flags &=3D ~MSG_SPLICE_PAGE= S, > > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > > | (void)( ) > > > 1 error generated. > > > > > > Let me do some wider build testing to see if it is viable to turn thi= s > > > on for the whole kernel because it seems worth it, at least in this > > > case. There are a lot of cases where a warning won't be emitted (see = the > > > original upstream review for a list: https://reviews.llvm.org/D3976) = but > > > something is better than nothing, right? :) > > Well, that was a pipe dream :/ In ARCH=3Darm multi_v7_defconfig alone, > there are 289 unique instances of the warning (although a good number > have multiple instances per line, so it is not quite as bad as it seems, > but still bad): > > $ rg -- -Wcomma arm-multi_v7_defconfig.log | sort | uniq -c | wc -l > 289 > > https://gist.github.com/nathanchance/907867e0a7adffc877fd39fd08853801 It's definitely interesting to take a look at some of these cases. Some are pretty funny IMO. > > Probably not a good sign of the signal to noise ratio, I looked through > a good handful and all the cases I saw were not interesting... Perhaps > the warning could be tuned further to become useful for the kernel but > in its current form, it is definitely a no-go :/ > > > Ah, neat. Misleading indentation is another possible angle, I reckon, > > but not sure if that's enabled/possible to enable for the entire kernel > > Yeah, I was surprised there was no warning for misleading indentation... > it is a part of -Wall for both clang and GCC, so it is on for the > kernel, it just appears not to trigger in this case. > > > either :( We test-build with W=3D1 in networking, FWIW, so W=3D1 would = be > > enough for us. > > Unfortunately, even in its current form, it is way too noisy for W=3D1, a= s > the qualifier for W=3D1 is "do not occur too often". Probably could be > placed under W=3D2 but it still has the problem of wading through every > instance and it is basically a no-op because nobody tests with W=3D2. > > Cheers, > Nathan > --=20 Thanks, ~Nick Desaulniers