Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2235044rwb; Wed, 30 Nov 2022 04:18:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf7GQs7JBzvm6f9EGdhUAu1SfUEcpPvvNzKc5ZkOcCJjJF9vWht30+ja5Sean/va9/oyVKE2 X-Received: by 2002:a17:906:b46:b0:7ad:a030:4816 with SMTP id v6-20020a1709060b4600b007ada0304816mr39075633ejg.765.1669810706748; Wed, 30 Nov 2022 04:18:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669810706; cv=none; d=google.com; s=arc-20160816; b=UT+BVvWES50tl1ZerfxzrK2OAA6jTCzb88jRcDM+Cixwvps0UnsRgKO/e9xwTyqTnw hbjbYORexLkdGYTGdoM8uEDptVNuLG506szNlN+i2Oxhy+1FqdsTVhHlGRnWWoYMesM/ hoWU4KGZIJusxZN07z8KbOUEji1eET6ndasEoc/Su6WwlspEVSOhaJIIYRUr/Cwlo3+Z tqsXTsakF8S9YLJQi8SOKMJwHcyDOaQPB3e5BhAqL+BFCDFToatFM1yi+fTGW4sasJju jsluMzxfyxCaUPYDpnVREJ7gA+43Xr2A5B8G4orWH2/UwlFh1PH89XKoufS/U2TX+jkg mgwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jnVdlteFV26Z76cEF4gxE55CdPW4P3QACX8nQF2ZXTo=; b=MdjB5aWRdw8WsP+oevkXs9aghUoTer7RGxkWmliqMcUwPhitLLiR+41kJ4b0vIybxd 7NdrF7pKmRxh68EEnjWi173pqMMMw8cnCH5A0ag+5UhSSTq7oQ0+JmV24xG2UWp2bfBi O04vwinE7s6BuTVk4AXPy1g/tMtfx3bP3IOlP6qU4RdFSzP7EsgVX1LhipB9qcRTnQBH ZibDRtiSLVuA6qza7F+GuMdg57dJ6fEksuHMALKMkoE25uwLYMyyZXYmxiuI7fGJu2Jq 1LxsW4v1x0dtxtigUUuhZIFGZn/4hFac9Hwb1U05Do8ucWoW68QFrCthLOoeeo+JMAYb uo+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W/dSB4qs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dm20-20020a170907949400b0073d9ea386d4si1092205ejc.983.2022.11.30.04.18.05; Wed, 30 Nov 2022 04:18:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="W/dSB4qs"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231190AbiK3MIg (ORCPT + 84 others); Wed, 30 Nov 2022 07:08:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbiK3MIe (ORCPT ); Wed, 30 Nov 2022 07:08:34 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F5E3766A for ; Wed, 30 Nov 2022 04:07:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669810058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jnVdlteFV26Z76cEF4gxE55CdPW4P3QACX8nQF2ZXTo=; b=W/dSB4qs5hwMfYN4TjxxFnqFD4auu9K07/woj4RDIZunyWcd9qT2g9XoFZvOSjAqfTe4Ga sPDuA5GKhAnz1PJtE0E805fwucXHtgi6wF0TyYucotzcJnBT4lkI2YNflsI6f5EEvixFEq 5X6WL3hpHvkVlHRo2bXgnkAdSZ4Yo+A= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-417-1N8GRhIhOfyivOE8jFnzyw-1; Wed, 30 Nov 2022 07:07:37 -0500 X-MC-Unique: 1N8GRhIhOfyivOE8jFnzyw-1 Received: by mail-wm1-f69.google.com with SMTP id i8-20020a1c3b08000000b003d0683389daso901874wma.6 for ; Wed, 30 Nov 2022 04:07:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jnVdlteFV26Z76cEF4gxE55CdPW4P3QACX8nQF2ZXTo=; b=x+5Zh8I1f0NzcPUn8ibFX65y7eCFO9zweAGVoAHCPhCpLHp4683wuwiVDhtQsB/do8 z+5KMMthXtor2wf3gxs0cULsUOt7Ct/+rRPi9SCdpkEEEpvSmuosuVPsy5Q0B3lC1EcI M9yjgYwi+FmU5zsFKNjHMpGN1ZIfUZ6QOwW+7eKYTVn/hFQetrTn5AxpHxr3bqvQVvhh O9C+eC5wsr4rSKUfrpyJSXTEsD/LZAljn4Kw9KcPSTkJMgM96mCdMpjORI4NnuINhNtg Ne36NDWXQ/gmm0UbXDpyuaeYHTtwWl1D8diCYhUCLWAmqCvruSc36VjZcajWWwZxMcwB Rvqw== X-Gm-Message-State: ANoB5pmle8YGroU2ZUFRsUpmNkK3o+u3OQHCy+4VNY0FQ97xEhofq0Us v9pFj2Vxk4I6iB3DwW2zIci+6ETB0zvtEASofd0CaHjF6duCHbi7V2AogPHcVSCdFmcYWEQZ2iO uaJyVdqd2PkRNQZJo28hw3lp2 X-Received: by 2002:a05:600c:3c8e:b0:3d0:69f4:d3d0 with SMTP id bg14-20020a05600c3c8e00b003d069f4d3d0mr4598112wmb.93.1669810056148; Wed, 30 Nov 2022 04:07:36 -0800 (PST) X-Received: by 2002:a05:600c:3c8e:b0:3d0:69f4:d3d0 with SMTP id bg14-20020a05600c3c8e00b003d069f4d3d0mr4598054wmb.93.1669810055886; Wed, 30 Nov 2022 04:07:35 -0800 (PST) Received: from pc-4.home (2a01cb058918ce00dd1a5a4f9908f2d5.ipv6.abo.wanadoo.fr. [2a01:cb05:8918:ce00:dd1a:5a4f:9908:f2d5]) by smtp.gmail.com with ESMTPSA id j3-20020adfd203000000b002366c3eefccsm1368822wrh.109.2022.11.30.04.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Nov 2022 04:07:35 -0800 (PST) Date: Wed, 30 Nov 2022 13:07:32 +0100 From: Guillaume Nault To: Benjamin Coddington Cc: Christoph Hellwig , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Philipp Reisner , Lars Ellenberg , Christoph =?iso-8859-1?Q?B=F6hmwalder?= , Jens Axboe , Josef Bacik , Keith Busch , Sagi Grimberg , Lee Duncan , Chris Leech , Mike Christie , "James E.J. Bottomley" , "Martin K. Petersen" , Valentina Manea , Shuah Khan , Greg Kroah-Hartman , David Howells , Marc Dionne , Steve French , Christine Caulfield , David Teigland , Mark Fasheh , Joel Becker , Joseph Qi , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ilya Dryomov , Xiubo Li , Trond Myklebust , Anna Schumaker , Chuck Lever , Jeff Layton , drbd-dev@lists.linbit.com, linux-block@vger.kernel.org, nbd@other.debian.org, linux-nvme@lists.infradead.org, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-afs@lists.infradead.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, cluster-devel@redhat.com, ocfs2-devel@oss.oracle.com, v9fs-developer@lists.sourceforge.net, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag Message-ID: <20221130120732.GB29316@pc-4.home> References: <20221129140242.GA15747@lst.de> <794DBAB0-EDAF-4DA2-A837-C1F99916BC8E@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <794DBAB0-EDAF-4DA2-A837-C1F99916BC8E@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 29, 2022 at 11:47:47AM -0500, Benjamin Coddington wrote: > On 29 Nov 2022, at 9:02, Christoph Hellwig wrote: > > > Hmm. Having to set a flag to not accidentally corrupt per-task > > state seems a bit fragile. Wouldn't it make sense to find a way to opt > > into the feature only for sockets created from the syscall layer? > > It's totally fragile, and that's why it's currently broken in production. > The fragile ship sailed when networking decided to depend on users setting > the socket's GFP_ flags correctly to avoid corruption. > > Meantime, this problem needs fixing in a way that makes everyone happy. > This fix doesn't make it less fragile, but it may (hopefully) address the > previous criticisms enough that something gets done to fix it. Also, let's remember that while we're discussing how the kernel sould work in an ideal world, the reality is that production NFS systems crash randomly upon memory reclaim since commit a1231fda7e94 ("SUNRPC: Set memalloc_nofs_save() on all rpciod/xprtiod jobs"). Fixing that is just a matter of re-introducing GFP_NOFS on SUNRPC sockets (which has been proposed several times already). Then we'll have plenty of time to argue about how networking should use the per-task page_frag and how to remove GFP_NOFS in the long term.