[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD7_sbE6XZkwV2OyBk863Vfuf86FzHNg-U8bjaWRjt3ohcJa8g@mail.gmail.com>
Date: Tue, 17 Sep 2019 21:11:44 +0800
From: Pengfei Li <lpf.vector@...il.com>
To: Christopher Lameter <cl@...ux.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Vlastimil Babka <vbabka@...e.cz>, penberg@...nel.org,
David Rientjes <rientjes@...gle.com>, iamjoonsoo.kim@....com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Roman Gushchin <guro@...com>
Subject: Re: [PATCH v5 0/7] mm, slab: Make kmalloc_info[] contain all types of names
On Tue, Sep 17, 2019 at 12:04 AM Christopher Lameter <cl@...ux.com> wrote:
>
> On Mon, 16 Sep 2019, Pengfei Li wrote:
>
> > The name of KMALLOC_NORMAL is contained in kmalloc_info[].name,
> > but the names of KMALLOC_RECLAIM and KMALLOC_DMA are dynamically
> > generated by kmalloc_cache_name().
> >
> > Patch1 predefines the names of all types of kmalloc to save
> > the time spent dynamically generating names.
> >
> > These changes make sense, and the time spent by new_kmalloc_cache()
> > has been reduced by approximately 36.3%.
>
> This is time spend during boot and does not affect later system
> performance.
>
Yes.
> > Time spent by new_kmalloc_cache()
> > (CPU cycles)
> > 5.3-rc7 66264
> > 5.3-rc7+patch_1-3 42188
>
> Ok. 15k cycles during boot saved. So we save 5 microseconds during bootup?
>
Yes, this is a very small benefit.
> The current approach was created with the view on future setups allowing a
> dynamic configuration of kmalloc caches based on need. I.e. ZONE_DMA may
> not be needed once the floppy driver no longer makes use of it.
Yes, With this in mind, I also used #ifdef for INIT_KMALLOC_INFO.
Powered by blists - more mailing lists