Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp98041pxb; Wed, 6 Apr 2022 23:37:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDJzfonWOD8Zp6IhYm+Kba2xz270TL0rhGd0LkxBtvpQXvdiuUJePF/J6Y7xZbOjncN6Bf X-Received: by 2002:a17:907:8a0b:b0:6e7:f483:394d with SMTP id sc11-20020a1709078a0b00b006e7f483394dmr11741915ejc.494.1649313427537; Wed, 06 Apr 2022 23:37:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649313427; cv=none; d=google.com; s=arc-20160816; b=a+6f5dUItUU0UPSK5nHcqa81UFEDYYyy7l3y3jTku8OZG8C6vNsaihPj+X7DVOAEMP HdU4aMPNbfgbYvRnv2VNX79t8FQnyHWXXRseSohE4PpV7hgiullzwRUSC3ANhii3+epK XZKAKmPo0xXYFjqfO4/TjiHLcFXHnvhAnlV+4qaBNatMYeLm7R+X5ErxxExogqWPeL/l DJNc5wqQ/AUTcCo8XsoiRqRD9ZDXAk36h6+DtQeuTN1sQ1YhXPzhbkZUs+PR+I9FMxUb eK2nXoaXREkC5b16pQVwVDHegeo0D9b21Qwy/t3Ff7QyYE8GaPhm+ZWfj8j++LqGv/yP 0GDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:references:in-reply-to:subject :cc:to:from:mime-version:content-transfer-encoding:dkim-signature :dkim-signature; bh=2LjY7E5WI6EGhhDKTioLFymIZP0/l0i8h3H4GhAFZcA=; b=hw0KtQlnSqg/GMdYnD0KkuWjMpX1uSvk1HH9zOBvYWnsgyrpsBf7FulqQSO42prppy QUtxJVRCET4LL8ljMP+RJI6OzOfe9lw7Qr/8nNM5QiCXXZzfmvkQgTU8mWqqwdImqfie UsEaQLURsEPUtrhkifmNxo7nidUodo3cIGO2+fDIQuf/1M7GbNiBnH9DeFkl8LSTwT4R QAkpQKDQh9nRl2y5zDktVXd5x8YOTM5WpVzS2FI+V4E6T997a3o6f+PVjiZEwn0jz3Xk byX7W367aBW7Hqa7gCFYFSe6KLo/cOqjm9I8ifq3bzVSITBY9HuVsi2snKjtt3S4yC/7 dMOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=F64T87FE; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a170906594800b006e7f865ec9csi7807284ejr.850.2022.04.06.23.36.33; Wed, 06 Apr 2022 23:37:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=@suse.de header.s=susede2_rsa header.b=F64T87FE; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236154AbiDGEZK (ORCPT + 99 others); Thu, 7 Apr 2022 00:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbiDGEZJ (ORCPT ); Thu, 7 Apr 2022 00:25:09 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353F3764D; Wed, 6 Apr 2022 21:23:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 795DD1F859; Thu, 7 Apr 2022 04:23:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1649305385; h=from:from:reply-to: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; bh=2LjY7E5WI6EGhhDKTioLFymIZP0/l0i8h3H4GhAFZcA=; b=F64T87FE/B/zTRK/zeGFkzYbcOYEpfk4hnza8TqQk86fb0axJLHNv5/xh8kYqv7ft0gVH8 E4jSlVrvNZLiNrz++QdRHQVn4EEJ3zqlEuJI9tcsOmTRHuGjgqtqrGC/4B5bZ34jlQ6VpB ORtNpbLkZm7a0/adFulXHuY/VjPvj+4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1649305385; h=from:from:reply-to: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; bh=2LjY7E5WI6EGhhDKTioLFymIZP0/l0i8h3H4GhAFZcA=; b=Pe5uAttmH0M6hNr5cKECyxYRW/m61uJ8W+AceMtxNsBGpXkrDfnp8bTpIjeKsG1ZJmKxAd U4XNi9Yd5S2L5nCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 820D313A66; Thu, 7 Apr 2022 04:23:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OHErDydnTmImMgAAMHmgww (envelope-from ); Thu, 07 Apr 2022 04:23:03 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 From: "NeilBrown" To: "J. Bruce Fields" Cc: "Dave Chinner" , "Trond Myklebust" , "Chuck Lever" , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: sporadic hangs on generic/186 In-reply-to: <20220407014939.GC1242@fieldses.org> References: <20220406195424.GA1242@fieldses.org>, <20220407001453.GE1609613@dread.disaster.area>, <164929126156.10985.11316778982526844125@noble.neil.brown.name>, <164929437439.10985.5253499040284089154@noble.neil.brown.name>, <20220407014939.GC1242@fieldses.org> Date: Thu, 07 Apr 2022 14:23:00 +1000 Message-id: <164930538057.10985.13909676315036428067@noble.neil.brown.name> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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-nfs@vger.kernel.org On Thu, 07 Apr 2022, J. Bruce Fields wrote: > On Thu, Apr 07, 2022 at 11:19:34AM +1000, NeilBrown wrote: > > I had a look through the various places where alloc can now fail. > >=20 > > I think xdr_alloc_bvec() in xprt_sent_pagedata() is the most likely > > cause of a problem here. I don't think an -ENOMEM from there is caught, > > so it could likely filter up to NFS and result in the message you got. > >=20 > > I don't think we can easily handle failure there. We need to stay with > > GFP_KERNEL rely on PF_MEMALLOC to make forward progress for > > swap-over-NFS. > >=20 > > Bruce: can you change that one line back to GFP_KERNEL and see if the > > problem goes away? >=20 > Like this? Sure--might take me a day or two to run the tests and get > results back.--b. >=20 > diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c > index 05b38bf68316..506627dc9a0f 100644 > --- a/net/sunrpc/socklib.c > +++ b/net/sunrpc/socklib.c > @@ -223,7 +223,7 @@ static int xprt_send_pagedata(struct socket *sock, stru= ct msghdr *msg, > { > int err; > =20 > - err =3D xdr_alloc_bvec(xdr, rpc_task_gfp_mask()); > + err =3D xdr_alloc_bvec(xdr, GFP_KERNEL); > if (err < 0) > return err; > =20 >=20 That looks right. I instrumented my kernel to deliberately fail 10% of the time, and I got lots of nfs: RPC call returned error 12 so I'm fairly sure this explains that message. But you say the hangs were only occasionally accompanied by the message, so it probably doesn't explain the hangs. NeilBrown