Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2439632ioo; Sat, 28 May 2022 13:45:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7FmeD1u5fPsWU80RnIWUoWdovvIIUOYYi4R4YE9c/RpkYY2Es0H7g9vcDV1l1wx2T6TpM X-Received: by 2002:a17:903:215:b0:15e:cae9:7622 with SMTP id r21-20020a170903021500b0015ecae97622mr49286433plh.28.1653770734532; Sat, 28 May 2022 13:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770734; cv=none; d=google.com; s=arc-20160816; b=lh7ZQHWQvRY7DDcQzXWrVG+G33gFRhPIGbKRXmv+QzkVb0+GCY2uo2/OCXx3u0Rt9N bNn+7xnnd5wOQGg62C/IJJs7c4mM0Zt1fyAFRrF0/fVo4h289pfSb8TStii2kaU2Vogi FSymx5W8UaSzJ4Hr7P2FdrlX+T4YQZqDKMEvKb+6SckvE8hOWofB1KkWkvHzlUL5hGqx fnMle9cFaOHIoXzJSMlvbmr1IPEsVdk1/3b02SrBTKb1JOOQvpA+/bgbD7cCKvPoUIVb VGQUeA/h1DpcUeVwLOYgV4YpONR6jVh98WXc4dPKAWgqjlCfLr9udLO9STTMxYm4UfPc /SNg== 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=xkmgVlLHUrsvW9kgx9erOioxhXsicILhQsHT8zL99yU=; b=BRfYO9a69XtVUFVtJlDkRrtNtspoQiDCSibcYRVpDtV88Dm6Owz2CZR4Jyb4vC7in/ Vjx63q1u3m1R+frN/2DbDlf6kxWd6WGq1vAABn07iFDWqVgzoKCmIardG+gSSr+l+n4A HzPqC4RFZq3+7SqEt1zN4k+ZdjL+aIzHyYnAjKpETZTPc+UxAjFSYmlruCYPSwWfpBql WVm5JYYOqFotKk1EmzRnfALA9kz7ms2Nmr9wuyMGtIPFilCnJyMBZ6SaJzBxfSa7lBb6 DVhB9748zRQDSfCzMmKE3LGzJW3BPeDv4uqt5+JLOD/YfdArkGm3HA+xxfLkJ1ubyuEd 6sbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XOB+la0u; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h6-20020a170902f54600b0015cdeea3a8dsi11439249plf.374.2022.05.28.13.45.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:45:34 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XOB+la0u; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 920FF663CE; Sat, 28 May 2022 12:44:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231374AbiE0BVz (ORCPT + 99 others); Thu, 26 May 2022 21:21:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229741AbiE0BVx (ORCPT ); Thu, 26 May 2022 21:21:53 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 308A910D4; Thu, 26 May 2022 18:21:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=xkmgVlLHUrsvW9kgx9erOioxhXsicILhQsHT8zL99yU=; b=XOB+la0usr2jCz4xChRNHdSc0J WhH7oxwmbJpuLADA+beMwJMHr+8/2enHvbFU5P1nHLtmmb3nCuORNtyC2BzZWXQsARo+lfJSLHxcm oraiUqjZYKFprFe1EniS7BQygCgPhNEXMkXE6uAlpe8drYiWH++dR7qJ0/Qwm7QbzBH6/u1MQHP5x jTSUA8lZuL3xMzyXJDmST3fWiugu1lJUBqNnyuyCejDlVZ6Mo0FgMlFg9EpQSAWECX/GzKIFHjOrz nITbfhaRdhBV0zJVcVcV2lwSAgLfsIoO65FIz8KCfq5vH860jLkplEjWnzmf9iHzyGbP7hKp8JoaF ISqqts7w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuOfj-001i49-0v; Fri, 27 May 2022 01:21:47 +0000 Date: Fri, 27 May 2022 02:21:46 +0100 From: Matthew Wilcox To: Vasily Averin Cc: kernel@openvz.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Johannes Weiner , Shakeel Butt Subject: Re: [PATCH] XArray: handle XA_FLAGS_ACCOUNT in xas_split_alloc Message-ID: References: <348dc099-737d-94ba-55ad-2db285084c73@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <348dc099-737d-94ba-55ad-2db285084c73@openvz.org> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, May 25, 2022 at 11:26:37AM +0300, Vasily Averin wrote: > Commit 7b785645e8f1 ("mm: fix page cache convergence regression") > added support of new XA_FLAGS_ACCOUNT flag into all Xarray allocation > functions. Later commit 8fc75643c5e1 ("XArray: add xas_split") > introduced xas_split_alloc() but missed about XA_FLAGS_ACCOUNT > processing. Thanks, Vasily. Johannes, Shakeel, is this right? I don't fully understand the accounting stuff. > Signed-off-by: Vasily Averin > --- > lib/xarray.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/xarray.c b/lib/xarray.c > index 54e646e8e6ee..5f5b42e6f842 100644 > --- a/lib/xarray.c > +++ b/lib/xarray.c > @@ -1013,6 +1013,8 @@ void xas_split_alloc(struct xa_state *xas, void *entry, unsigned int order, > if (xas->xa_shift + XA_CHUNK_SHIFT > order) > return; > > + if (xas->xa->xa_flags & XA_FLAGS_ACCOUNT) > + gfp |= __GFP_ACCOUNT; > do { > unsigned int i; > void *sibling = NULL; > -- > 2.31.1 >