Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4478703rwd; Tue, 23 May 2023 08:13:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rPsVApdFEmyoTcre8znMuBJwmc6J7KJvydqSGLOMzEkUBMTfsSs+EkcYkwHkvvUEW13Oe X-Received: by 2002:a05:6a00:150d:b0:64d:5c1d:353 with SMTP id q13-20020a056a00150d00b0064d5c1d0353mr12643484pfu.19.1684854793750; Tue, 23 May 2023 08:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684854793; cv=none; d=google.com; s=arc-20160816; b=QesYsIRVJRWO9VFxlgJb9RHhapEpQdMr/z33jS/Tz26M56ZDybxnYNysMW2eFwkY60 Zr+ufrLueZfA0MZl9JonmK0hZ7fRb8zGunStOlqymttVVmmimCxCp5Shx92H6G4Gf/eI oUC9afd1hq0ZfY5HWtJT/xd+z3mZ9LgOnrDSxrVx6vzafQyMnKlfnU7P/wbxlhQJlfix XuqFBcKiXqBUoh2w1ViGcY59AgLI88bo7P/M2C5kYhI5Y3CaJWsNhUpNmXf9VHUzdLXW 1xpNnKUYucoyBh8CPHhJkVKA+EgQag4neROZZsv90Ese1X9sasQOTwgOGaSRK94N9LpH HOBQ== 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:date:from:dkim-signature; bh=+bI1dsyGUTIty3MU+zkXPgg+upru8yu3Pn2ZYvnI6C4=; b=cbol1dtJdTCdDDsj42Q4w8i/wVMW0g0ZpliWogT1NoqtZXEJdzTWz67k7p7lQJtJv8 eiipZ6qZ3vGIGnF1lVjHKK+wDk6YG+xItgOorsXOYSVVqRfayt+cvSoktHf63pnU4Fic ubCOWoFZ+0q+jdkTQMy0rjpr6vj2EVdhxEU4MfP7hp+mhX22GxQnp+URzS46mweyBqZ6 23Mrg2qQBAH+tC+GnhQFe1lEsp4S2Y+/QxV/64iNRBHgAgVJttgIMVH/sGeKsEB67xAv GUAuKlmmorTt5PoMskGWWjMzFuM6JTBo38225xOocKRZWTRQ7duKH8u0F+xkv/7cmFSO segQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=Rbg31Yrz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 24-20020a631258000000b0053075988265si6654543pgs.59.2023.05.23.08.13.00; Tue, 23 May 2023 08:13:13 -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=@gmail.com header.s=20221208 header.b=Rbg31Yrz; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237423AbjEWPBk (ORCPT + 99 others); Tue, 23 May 2023 11:01:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234096AbjEWPBh (ORCPT ); Tue, 23 May 2023 11:01:37 -0400 Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F30FE9 for ; Tue, 23 May 2023 08:01:36 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-4f4b0a0b557so2593763e87.1 for ; Tue, 23 May 2023 08:01:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684854034; x=1687446034; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=+bI1dsyGUTIty3MU+zkXPgg+upru8yu3Pn2ZYvnI6C4=; b=Rbg31YrzW/nfnIVkC+VyHJGr0WjR+UfL0YLUdxZlOdp1yuKvdVjAjq/7YL4IP/roVs P5Y+bFK9KCxBaz8sT/t30rl8XvNaN9zEpIvNQ+xojy6clrxsjKHXgZGPwK13Sk7M6MrY PyCiPieag/kwtCC8EH0CTJ+sAG9WuzASDm4JK43soq0ZSHWeOUBilEXyHqgsb+oNNSAr Mawo+1voujfJ/sx2iI3A/FduJO80/MgBO5+plE1HDa9YuE3OTk6aPt/cVftlOLcXFjXs 6novV7fTpm6EoOkgoQXw2z53LqHGNkDJHDy7+ouNBtey3Yg43cRv/RpwKCIvzaCYVu+0 ORqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684854034; x=1687446034; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=+bI1dsyGUTIty3MU+zkXPgg+upru8yu3Pn2ZYvnI6C4=; b=c9bqxbpQHp5LHoeLjh+0G0OZd2IUI9EVH1yS14S27XUsCPJ19eMrL76BqCwAqth+V4 LgVfIMts8YeLcm6lH9QUHDKOn24kPYiEb3UGmKBaDdVbkYENaGQIQdsuhh3yRxM6/kIG 7JNmdHaZOdRHOE09+54Reb7fs4EFQoo+ngP2QI3qpLpaRId01fKC22Tx7tN/Jk53/aMY Qr/YuCOaIk6WK6/w49njMQUPbjf09+toYfN6GkV6KJDsvSrNVnpLhfN5gvK1g1aP6LG5 Yj22NkEgNxaSUFifEP2lpGRzA2J4VLMMHUeHs8uXzmuLgIGnYE+3EkdP7mjNGQvDMt8q yF9A== X-Gm-Message-State: AC+VfDwV1Nj3S42qb9O28hoPCp+ZdhX7/KptJNS1TaFm1p0JPVVW9V90 0B1yaKSSBl1E01NP3buWtik= X-Received: by 2002:a05:6512:908:b0:4ef:f11c:f5b0 with SMTP id e8-20020a056512090800b004eff11cf5b0mr4427623lft.54.1684854034234; Tue, 23 May 2023 08:00:34 -0700 (PDT) Received: from pc636 (host-90-235-19-70.mobileonline.telia.com. [90.235.19.70]) by smtp.gmail.com with ESMTPSA id m6-20020a056512014600b004f27cecb68asm1376307lfo.166.2023.05.23.08.00.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 08:00:33 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Tue, 23 May 2023 17:00:31 +0200 To: Christoph Hellwig Cc: "Uladzislau Rezki (Sony)" , linux-mm@kvack.org, Andrew Morton , LKML , Baoquan He , Lorenzo Stoakes , 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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 11:12:08PM -0700, Christoph Hellwig wrote: > > /* 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. > Will fix it. > > + 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. > No problem. I can make it open-coded. What is about an access to tree/list? >> unlink_va(va, &fbl_root(z, BUSY)); I mean this one. -- Uladzislau Rezki