All of lore.kernel.org
 help / color / mirror / Atom feed
From: Uladzislau Rezki <urezki@gmail.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Uladzislau Rezki <urezki@gmail.com>,
	Adrian Huang <adrianhuang0701@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Adrian Huang <ahuang12@lenovo.com>
Subject: Re: [PATCH 1/1] mm: vmalloc: Optimize vmap_lazy_nr arithmetic when purging each vmap_area
Date: Mon, 2 Sep 2024 19:03:02 +0200	[thread overview]
Message-ID: <ZtXvxuD-xkUkveRo@pc636> (raw)
In-Reply-To: <ea017b05-7a42-4d3a-a1f2-9bceb56966e3@wanadoo.fr>

Hello!

> 
> Hi,
> 
> unrelated to your use case, but something that coud easily save a few cycles
> on some system, IMHO.
> 
> Maybe:
> 
> #if NR_CPUS > 1
> static __read_mostly unsigned int nr_vmap_nodes = 1;
> static __read_mostly unsigned int vmap_zone_size = 1;
> #else
> #define nr_vmap_nodes	1
> #define vmap_zone_size	1
> #endif
> 
> So that the compiler can do a better job because some loops can be optimized
> away and there is no need to access some memory to get theses values.
> 
> Not sure if such a use case can exist or is of any interest.
> 
> This is valide because of [1] and the #ifdef around the num_possible_cpus()
> declaration [2, 3].
> 
> 
> Just my 2c.
> 
Thank you, i see your point.

--
Uladzislau Rezki


  reply	other threads:[~2024-09-02 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 13:06 [PATCH 1/1] mm: vmalloc: Optimize vmap_lazy_nr arithmetic when purging each vmap_area Adrian Huang
2024-08-29 19:00 ` Uladzislau Rezki
2024-08-30 16:26   ` Uladzislau Rezki
2024-08-31  7:03     ` Christophe JAILLET
2024-09-02 17:03       ` Uladzislau Rezki [this message]
2024-09-02 12:00   ` Adrian Huang
2024-09-02 17:00     ` Uladzislau Rezki
2024-08-31  0:33 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZtXvxuD-xkUkveRo@pc636 \
    --to=urezki@gmail.com \
    --cc=adrianhuang0701@gmail.com \
    --cc=ahuang12@lenovo.com \
    --cc=akpm@linux-foundation.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.