Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4528810rwd; Tue, 23 May 2023 08:51:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7OnOg0iWwKr6TG/OrG2HF16vGopn7/EccHYk8dykUYVdmm9Il4+ClkK9uOBq6zcGsjsDDb X-Received: by 2002:a17:902:e887:b0:1a6:c595:d7c3 with SMTP id w7-20020a170902e88700b001a6c595d7c3mr16564087plg.22.1684857101921; Tue, 23 May 2023 08:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684857101; cv=none; d=google.com; s=arc-20160816; b=fluHIrLcN14+Qs0j0Dp46jKQHttEZWQ6l08B1RTxppZHGQoob7JtcX+fxkNPqfgQW4 hcbQresOa/CIrJCvD732ntcfw/lAeYBDSvZUDjA9vAIHoyrC08zuaOXUUK3A0foHogkz 0a6f2bVEYyfQvBxTAfDIwP8Qc3vokpsSKooj7+Tft1vQzwyKNLzCcM+Hdpn9pKRrvrgL Arfd5yG6u0aNSnKLuGyfrizz4Ar1caFf/svmwnGO8p9AUnow5f4EM3MNILGmMCLk/P5K zbhaG2c5xTk76tbTtZC37+ZmPiqCPpcLwJV59CgIE1NVMoKHp+F7e4A1FuR52jjVNtL6 Jmvw== 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=IA+o4TYzj/wUc+bKRC5VylEuRukqJEtvNsD6FrfEKbI=; b=f1m+ESoJI38M6qxiz7QGTDeKqc7DiEchtGx3e6N345+asRaQ1efsI7Echc2vfkn4yS lk1B/d1W4szTyDh+EQIUGGFXsyub/hgWQySQeSajMVeP5R+jH1LfQr5MXIMwo6AgMOOt CDfU/5PZDPPSOQQ0DPbqTBFVsztltD+B+57L5GXpUjKnR2NuHuBKjdcTmtgtDNhRUvx7 hc8i3rdVz/C33vcNVbogxjR040VOpzmeMUMTXSctLNS60u+YhAqg9pkD1z7lwhlo9PxG v8bIkc+2nlAQWztV9sjcmzRxyiQdT/qQgYaV4zOb+d9Iwew0zv3xdclYWwsTuA/qFEPS IWBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=cwqo3MNB; 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 n13-20020a170902d2cd00b001a1ee8ceedcsi7089346plc.495.2023.05.23.08.51.26; Tue, 23 May 2023 08:51:41 -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=cwqo3MNB; 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 S237542AbjEWPd4 (ORCPT + 99 others); Tue, 23 May 2023 11:33:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237530AbjEWPdm (ORCPT ); Tue, 23 May 2023 11:33:42 -0400 Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE471AE for ; Tue, 23 May 2023 08:33:33 -0700 (PDT) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-4effb818c37so8417752e87.3 for ; Tue, 23 May 2023 08:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684855952; x=1687447952; 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=IA+o4TYzj/wUc+bKRC5VylEuRukqJEtvNsD6FrfEKbI=; b=cwqo3MNBzGhzZAH/q9y2Torq7BU6ej3XDe25GqHo4ZTpcitBLrK4o+abJzqFs/yka4 3trzSTSfZih1vWNe5PBVRb9qk0M7ZfyZdP911n5jfFYG6rR5gY9vWITNUjpMoHOIvADF OsYOKbxghZQfuzkdmrx3GGlGEgLdpis5K+SV3lNnbYohemoVAnqupFttSq2/TOHblf4k zyrNc74ie+s3j9lXG116zfwRUj/PYAHJDgfCS5HfZwfU94hJgb2PrQSCs1C4WF1aTmz+ hri6fTVTZvYPSY3rTHtj/f70XFkXzXzZOowZWLnO5yEkyuZTq2xFH7g4Wsg4pP5UoHcm c/AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684855952; x=1687447952; 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=IA+o4TYzj/wUc+bKRC5VylEuRukqJEtvNsD6FrfEKbI=; b=XCeUE1SfbXxFaTrPAZgulhKHKB6Gr8CAUr19MOA39eR/6zqkUIg6gtV7mujSLp48Gm UAdlyVy6ehCA+a8X8j40k8x3PjQc9PLaJhLjnK1481UcSBa1l/nOOPnXrYitMKfmfBAA /Op43rN5RNkXt5Ps0zLUWJ46KaeeDO27m6SIWPFMtSxdOChvfsH3LqSffYa84oCCw8Ek 3UYtOS8EuWeUc43xiyDEJKGewUzKzPEdAXHwTOgXOA2gPpoYmDOZFNPXED8ySNsfkLXv eFlIrk7J+gG3qgyhe7gD4LwZjFw7F/LjcWyNx5X0e9kyXsCGHjKcG+ifooWiwJNw/B10 n7cg== X-Gm-Message-State: AC+VfDy2y4RGMOv83MtpgGdxUuSBSVCLTxuO4CsiXGtYPl6Gndfrf3RT qWDkRyYGqr8gGgpBkw2omHI= X-Received: by 2002:ac2:491a:0:b0:4ef:ec33:9155 with SMTP id n26-20020ac2491a000000b004efec339155mr4417410lfi.28.1684855951824; Tue, 23 May 2023 08:32:31 -0700 (PDT) Received: from pc636 (host-90-235-19-70.mobileonline.telia.com. [90.235.19.70]) by smtp.gmail.com with ESMTPSA id t15-20020ac243af000000b004f3b4a9a60esm1374593lfl.106.2023.05.23.08.32.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 08:32:31 -0700 (PDT) From: Uladzislau Rezki X-Google-Original-From: Uladzislau Rezki Date: Tue, 23 May 2023 17:32:28 +0200 To: Christoph Hellwig Cc: Uladzislau Rezki , 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 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: 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 Tue, May 23, 2023 at 08:13:47AM -0700, Christoph Hellwig wrote: > On Tue, May 23, 2023 at 04:53:25PM +0200, Uladzislau Rezki wrote: > > > > +#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. > > > > > If open-coded, it looks like: > > > > spin_lock(&z->fbl[BUSY].lock); > > Give the fbl structure a name and you can have a local variable for it, > which will make all this a lot more readable. And then unless there is > a really good reason to iterate over this as an array just have three > of these structs embedded named free, busy and lazy. > OK. I can go that way. -- Uladzislau Rezki