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 82971C77B75 for ; Tue, 23 May 2023 15:33:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236956AbjEWPd5 (ORCPT ); Tue, 23 May 2023 11:33:57 -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-Google-Smtp-Source: ACHHUZ4qQXNc5zVZIoSn00zDoKQbllQw4NAyB1PI6m5/K4VTNEo/Mk/CgptF1aF1BQy5Kg1SKVgUFA== 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: 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