Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3890242rwd; Mon, 22 May 2023 23:16:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AQ4faHdC/FsYF5vbZZOrin4/8ce8J1nKnUiqG7l3g/E4yIZFknAAuzVopJ4CDrd9xLpOd X-Received: by 2002:a17:902:f682:b0:1a6:db0a:8005 with SMTP id l2-20020a170902f68200b001a6db0a8005mr14450353plg.68.1684822612660; Mon, 22 May 2023 23:16:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684822612; cv=none; d=google.com; s=arc-20160816; b=oIIgd8Bg785Qkqe6Ya+gPYhBt9Ejjq7KKakaQAcu11WKfyhDEhBz5FyVUfYgC5hO6s r0TwNzFErjdiyyG+22FrNiXarQwIE5inYrd6VwrBx6ZOYlyL9Z1YifOtofcvFQ0gr/Sz UAKUaCyA+lcy87ZAYwNjpKBcDja3ZshETsj4uAs64bQpTeKEUqiTd9YxE9UdVHAu+zQb yervKoK/q7/nWHcqE0Tg5TZswiZrD6zDPloj0e/ZtkG45obPnHS0J4HRsZWEA4fP/eCg GTGRq27i+VQdDnHIyOQ4A1NkJHRw+nlzBl3xo50UN82+3p9LIamXEHGNatNVzyBbtwIe 7Eag== 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=Ixn+rZNZqU08FRWrwa4R0S2pNfRR6ks2apgoACPUtP0=; b=xkSuEebFM2xm/JSGG5uIaamdLiHGuK9wsq8BllZ/oH0vtwEWH8pjSvz+dvqpQZd9JE KVCrC08+SnA+5AdSkOrL92uIoJkgLwQBGS441fy2MSYcnpH3cZLVjtSoVCbx5y8GZkll jih3j7k9c/iTBT0j/66zwkGZBgJjfTs4kvkk7/DKYXao4xQmAGMnHIKBQcPFqAzMQLZr +L6+hLN5n41f+Vh3C/GPDUxA4K9Qiw/lu3Q0f1bjwufhH1hc5R4K/cF3u4b9uvVHSVRm qlVur45dMY+uA46wrVcLk6VP9CptaBKdMpJRExo+eU+fT+DrikbtraEM1kySB6IQd7E5 smZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=tAhQb7IT; 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 h10-20020a170902748a00b001a51bb4ad81si3690169pll.44.2023.05.22.23.16.38; Mon, 22 May 2023 23:16:52 -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=tAhQb7IT; 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 S234826AbjEWGMP (ORCPT + 99 others); Tue, 23 May 2023 02:12:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234987AbjEWGMM (ORCPT ); Tue, 23 May 2023 02:12:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50FBD109 for ; Mon, 22 May 2023 23:12:11 -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=Ixn+rZNZqU08FRWrwa4R0S2pNfRR6ks2apgoACPUtP0=; b=tAhQb7ITM0IVw8kqDWDG1iI34e 5wjZI67d7Bvjdz3SBtq2hfBj3IX0v0U9et0Xa2nXwb11qNf/Z28zafYPTfJQ5MqxiSDui/7UV4nPi xJpNEiw3eGo0urW7+8oflokdeGO7iHnyykS1a83NHWvc3HicrDNy9WJYDHJX0FXKWEugVZL8+JAlZ F2rFecMK9pkHyfn37sFrHY3p4IVicFmZK74uWcMNJqV5WtV98KxQGb73ihDM1PFhCAyxeHNROsDnx 4WgvAdzyyuJKtDowLfwI92iLZ6riqDOAYXDOTOVfSXB2lQKRNg80Sje1UKwuXKdf5+2JYqgnUOhWL TvivjCng==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1q1LFg-0092yI-1I; Tue, 23 May 2023 06:12:08 +0000 Date: Mon, 22 May 2023 23:12:08 -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 5/9] mm: vmalloc: Insert busy-VA per-cpu zone Message-ID: References: <20230522110849.2921-1-urezki@gmail.com> <20230522110849.2921-6-urezki@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230522110849.2921-6-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 > /* Look up the first VA which satisfies addr < va_end, NULL if none. */ > -static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr) > +static struct vmap_area *find_vmap_area_exceed_addr(unsigned long addr, struct rb_root *root) Please avoid the overly long line. > + struct cpu_vmap_zone *z = addr_to_cvz(va->va_start); > + > /* > * Remove from the busy tree/list. > */ > - spin_lock(&vmap_area_lock); > - unlink_va(va, &vmap_area_root); > - spin_unlock(&vmap_area_lock); > + fbl_lock(z, BUSY); > + unlink_va(va, &fbl_root(z, BUSY)); > + fbl_unlock(z, BUSY); I find the BUSY magic here very confusing, and would prefer to just spell the actual lock reference out.