From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC4F6C77B7A for ; Tue, 23 May 2023 06:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234993AbjEWGMQ (ORCPT ); Tue, 23 May 2023 02:12:16 -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 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.