Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3890852rwd; Mon, 22 May 2023 23:17:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cRLMsfg7l+ecgDeO/xPxKhlWJp8SCFJucHHahGJv3NUu9Cgx8q4YIHt/2Dh0wxV9nMdUx X-Received: by 2002:a05:6a20:1614:b0:103:81cc:dd3f with SMTP id l20-20020a056a20161400b0010381ccdd3fmr15031661pzj.48.1684822652779; Mon, 22 May 2023 23:17:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684822652; cv=none; d=google.com; s=arc-20160816; b=LuF1mc7YchdRVzgHAJ5XJfGBn7CE+cbHnHXPZ/m9RDgNNvNshefG+m49Nhki2FcgIz ICQ0z7txAHa9DpYy5hysnsTLHmfsJI28HQtf+FttUuBn9E0h9G0mqKj5a/8mRFKRR1un QcNR0NlwUbcDiW7++SD2t2qG0gjArQmqGl7hGFkHZemxh2FxyMke7d4iJmKzjHof5f7A 0M0IYwQpysjbTsFXkVmSL6+U5o0zeF+zAwwAZ8dCIktvOGFwwS6HbuMCbhFIO9wwu7S6 HA+o3Cn4w8xvMxjFN8+qLvV9z/gBmYxacUs63EodoNowLIgz58JP0bvGQvQblCaNFOs/ Ds+A== 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=owdq4bOKhiwEwPqay2Uzo5vGXFeLCMdjpZNuyI6GdYE=; b=AP4SF6gr7TUcE/eRamkPc3IUTe1Fv5oO2LPTFYYCXDm5QFwDcbzy1LVgHU/EsXwLep wRlIO8DRseCvRELjLsL6ing27j+DhFCbyHWIvvUDHjNryvpYYR7+YHsc8qsuo325l5G7 uZpr2J8ZkHx+KccvqvkhtiMjA0GksWCCc3JFoxbUbTklW5j+5AP8fi9W6R6kcZDX8iyC 4L93AvL7eyGeNZ8oBjE/e/Ej+NqdtEm48FZmkvprNJBla1w/8WXkljZONOOSZegQsyRn X7Wo1Y/E6QE0Ntq2a4PCFCcZgLjYe1AWOUXMGRCKS8TCMg3Mqv4lkhpBFLG3t0byiIO8 vsyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="RO1JUnR/"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a63b04d000000b0051909d663d8si293541pgo.656.2023.05.22.23.17.17; Mon, 22 May 2023 23:17:32 -0700 (PDT) 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=@infradead.org header.s=bombadil.20210309 header.b="RO1JUnR/"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234958AbjEWGIp (ORCPT + 99 others); Tue, 23 May 2023 02:08:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234956AbjEWGIn (ORCPT ); Tue, 23 May 2023 02:08:43 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04DD109 for ; Mon, 22 May 2023 23:08:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=owdq4bOKhiwEwPqay2Uzo5vGXFeLCMdjpZNuyI6GdYE=; b=RO1JUnR/Vl76GI5e7oIoVCDMFL 60b7wwVYKzB424v4KXseBhfAmA5NNwHS1YmsBUKY36zoIJrjyTe33ITJ3M+ZmQSqkwXkw/QfjX8uO 10nmEzrSxiMJ+RBjTKUR3U7XE70hf18yDEAn+MzFDrPggztPIX64sBaWvy1O7Leek2wUTZsIjT+gp U7b+laX4uAx3POHayAnl4Imo/QsJeqNrk0mF4NRaFkUS3hvpRh42P7eOuYNaKf3m2MpqWEv/i5qcM Z/4J9NRw41NIllV/SmoCh74hBQeN9uHSVvzoUBzR0UcjgrCHwmKdlJk25H9fptOnLkfUDmC4kPQms bR0NWZkA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1LCI-0092f5-2r; Tue, 23 May 2023 06:08:38 +0000 Date: Mon, 22 May 2023 23:08:38 -0700 From: Christoph Hellwig To: "Uladzislau Rezki (Sony)" Cc: linux-mm@kvack.org, Andrew Morton , LKML , Baoquan He , Lorenzo Stoakes , Christoph Hellwig , Matthew Wilcox , "Liam R . Howlett" , Dave Chinner , "Paul E . McKenney" , Joel Fernandes , Oleksiy Avramchenko Subject: Re: [PATCH 4/9] mm: vmalloc: Add a per-CPU-zone infrastructure Message-ID: References: <20230522110849.2921-1-urezki@gmail.com> <20230522110849.2921-5-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522110849.2921-5-urezki@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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_NONE,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-kernel@vger.kernel.org On Mon, May 22, 2023 at 01:08:44PM +0200, Uladzislau Rezki (Sony) wrote: > +#define fbl(z, i, m) z->fbl[i].m > +#define fbl_root(z, i) fbl(z, i, root) > +#define fbl_head(z, i) fbl(z, i, head) > + > +#define fbl_lock(z, i) spin_lock(&fbl(z, i, lock)) > +#define fbl_unlock(z, i) spin_unlock(&fbl(z, i, lock)) Even if it is just temporary, I don't think adding these wrappers make much sense. > +struct cpu_vmap_zone { > + /* > + * FREE, BUSY, LAZY bookkeeping data of this CPU zone. > + */ > + struct { > + struct rb_root root; > + struct list_head head; > + spinlock_t lock; > + } fbl[NFBL]; Maybe replace NFBL with something longer and more descriptive? But also in general it feels like this should be folded into a patch doing real work. As-is it doesn't look very useful.