Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2271792pxp; Mon, 21 Mar 2022 15:31:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkzKN6ocNSn+VnEaNP1FT4MDDa+29/ERJAUeeXOCgGLv5XW1VlmlrDZHPv6LL8yAKq/aFX X-Received: by 2002:a17:902:b682:b0:153:81f3:6cc1 with SMTP id c2-20020a170902b68200b0015381f36cc1mr15037301pls.49.1647901883326; Mon, 21 Mar 2022 15:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647901883; cv=none; d=google.com; s=arc-20160816; b=Mmvq/vJhidaAbrWj8TlxysdAPwOXZW/9BTgMX7ovtV8g7aCfSuLi86VnmO/XIyhbZn bPHK4lpy+hkYRivmZp4SjGJrMMzhkcQLF8rd9MXP0herP0UF6GnMfBf8u4EIa0z0bcEt arBewogw9KYyfT+R71hIk7Fyi9AUfVCNCTjr0d1Aq5AEyJ1Dyxd+VplpTvz8AImNUyDv x1qmVyakOxFr9vC0/J438pAqn24fwrSae/15HUHRw0JRWhZoYo29zH/L70eKFKUsVMxv zp+gYtZkAaaRnD+HT5nBKgRlT31QB87cSAjz/4nfuqvEj4V9J0oUvKarcjTY8Otc6nZy h02A== 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:mail-followup-to:message-id:subject:cc:to:from:date; bh=mA06jbx8ZaWA0inK0rPXFXES01ieNfJFcE/HrrV6iIM=; b=ZmcJ4sWF3FKBFa7H94HIHymuo7vx2Ba3M67L8/KrbbJdSs+UDCpbJkhPXjJsXFBMP7 /zJR4E7WHBFT3Ci+mGLqCczlMmbuBfU8BGXH5qw7SWvs3XJsZy1z2Dbv+AXlkMZtIL9T TrV/njrcU2WgHrQTIz70w+WgT2MemtCUr7mKUvk8SQQXbISjaBqsBkqGY61V87j2w1KE iFaA5FrOB4YR3z9ezbHbN+fal+l/dVTUHznqc+dYBE/uxCH0BOX2m5KG9koDS3VH2BxD OsaBkE6YuTjvg8zdHh4r23RoPB0ooDeWCc+CvNbACnlTfEXwGKJGhIJoBuya1dagZwA8 PrHw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id b5-20020a170902d40500b00153b2d16504si10638120ple.268.2022.03.21.15.31.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 15:31:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1CA753CCCD8; Mon, 21 Mar 2022 14:45:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349109AbiCUOax (ORCPT + 99 others); Mon, 21 Mar 2022 10:30:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349242AbiCUO11 (ORCPT ); Mon, 21 Mar 2022 10:27:27 -0400 Received: from out199-4.us.a.mail.aliyun.com (out199-4.us.a.mail.aliyun.com [47.90.199.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A5E11A23; Mon, 21 Mar 2022 07:20:44 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---0V7r08HY_1647872438; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0V7r08HY_1647872438) by smtp.aliyun-inc.com(127.0.0.1); Mon, 21 Mar 2022 22:20:40 +0800 Date: Mon, 21 Mar 2022 22:20:38 +0800 From: Gao Xiang To: David Howells Cc: Matthew Wilcox , joseph.qi@linux.alibaba.com, torvalds@linux-foundation.org, chao@kernel.org, tao.peng@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, bo.liu@linux.alibaba.com, gregkh@linuxfoundation.org, luodaowen.backend@bytedance.com, xiang@kernel.org, gerry@linux.alibaba.com, linux-erofs@lists.ozlabs.org, eguan@linux.alibaba.com Subject: Re: [Linux-cachefs] [PATCH v5 03/22] cachefiles: introduce on-demand read mode Message-ID: Mail-Followup-To: David Howells , Matthew Wilcox , joseph.qi@linux.alibaba.com, torvalds@linux-foundation.org, chao@kernel.org, tao.peng@linux.alibaba.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, bo.liu@linux.alibaba.com, gregkh@linuxfoundation.org, luodaowen.backend@bytedance.com, xiang@kernel.org, gerry@linux.alibaba.com, linux-erofs@lists.ozlabs.org, eguan@linux.alibaba.com References: <20220316131723.111553-1-jefflexu@linux.alibaba.com> <20220316131723.111553-4-jefflexu@linux.alibaba.com> <1029982.1647872043@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1029982.1647872043@warthog.procyon.org.uk> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=no 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 Mon, Mar 21, 2022 at 02:14:03PM +0000, David Howells wrote: > Matthew Wilcox wrote: > > > Why do you have a separate rwlock when the xarray already has its own > > spinlock? This is usually a really bad idea. > > Jeffle wants to hold a lock across the CACHEFILES_DEAD check and the xarray > access. > > However, he tells xarray to do a GFP_KERNEL alloc whilst holding the rwlock:-/ Yeah, sorry, there are trivial mistakes due to sleep in atomic contexts (sorry that I didn't catch them earlier..) Thanks, Gao Xiang > > David > -- > Linux-cachefs mailing list > Linux-cachefs@redhat.com > https://listman.redhat.com/mailman/listinfo/linux-cachefs