On Wed, 29 Jul 2020 12:21:11 -0700 (PDT)
Hugh Dickins wrote:
Sorry for the late reply.
> On Sun, 26 Jul 2020, Pengfei Li wrote:
>
> > Since mm->locked_vm is already an atomic counter,
> > account_locked_vm() does not need to hold mmap_lock.
>
> I am worried that t
On Thu, 30 Jul 2020 16:57:05 -0400
Daniel Jordan wrote:
> On Wed, Jul 29, 2020 at 12:21:11PM -0700, Hugh Dickins wrote:
> > On Sun, 26 Jul 2020, Pengfei Li wrote:
> >
> > > Since mm->locked_vm is already an atomic counter,
> > > account_locked_vm() does not n
On Mon, Sep 9, 2019 at 10:59 PM Vlastimil Babka wrote:
>
> On 9/3/19 6:04 PM, Pengfei Li wrote:
> > There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM
> > and KMALLOC_DMA.
> >
> > The name of KMALLOC_NORMAL is contained in kmalloc_info[].name,
> &
On Mon, Sep 9, 2019 at 10:59 PM Vlastimil Babka wrote:
>
> On 9/3/19 6:04 PM, Pengfei Li wrote:
> > Since the name of kmalloc can be obtained from kmalloc_info[],
> > remove the kmalloc_cache_name() that is no longer used.
>
> That could simply be part of patch 1
approximately 36.3%.
Time spent by
new_kmalloc_cache()
5.3-rc7 66264
5.3-rc7+patch 42188
Pengfei Li (4):
mm, slab: Make kmalloc_info[] contain all types of names
mm, slab: Remove unused kmalloc_size()
mm
The 'type' of the function new_kmalloc_cache should be
enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/slab_common.c b/mm/sla
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm/slab_common.c | 93
kmalloc_caches[KMALLOC_NORMAL][0] will never be initialized,
so the loop should start at 1 instead of 0
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index d64a64660f86..6b3e526934d9 100644
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
---
include/linux/slab.h | 20
mm/slab.c| 5 +++--
mm/slab_common.c | 5 ++---
3 files
On Tue, Sep 10, 2019 at 2:30 AM Rasmus Villemoes
wrote:
>
> On 09/09/2019 18.53, Pengfei Li wrote:
> > On Mon, Sep 9, 2019 at 10:59 PM Vlastimil Babka wrote:
>
> >>> /*
> >>>* kmalloc_info[] is to make slub_debug=,kmalloc-xx option work at boo
On Tue, Sep 10, 2019 at 4:00 AM Roman Gushchin wrote:
>
> On Tue, Sep 10, 2019 at 01:07:14AM +0800, Pengfei Li wrote:
>
> Hi Pengfei!
>
> > The 'type' of the function new_kmalloc_cache should be
> > enum kmalloc_cache_type instead of int, so correct it
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a
KMALLOC_DMA will be initialized only if KMALLOC_NORMAL with
the same index exists.
And kmalloc_caches[KMALLOC_NORMAL][0] is always NULL.
Therefore, the loop that initializes KMALLOC_DMA should start
at 1 instead of 0, which will reduce 1 meaningless attempt.
Signed-off-by: Pengfei Li
---
mm
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm/slab_common.c | 91
did some cleanup work.
These changes make sense, and the time spent by new_kmalloc_cache()
has been reduced by approximately 36.3%.
Time spent by
new_kmalloc_cache()
5.3-rc7 66264
5.3-rc7+patch 42188
Pengfei
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
include/linux/slab.h | 20
mm/slab.c| 5 +++--
mm/slab_common.c
-rc7 66264
5.3-rc7+patch 42188
Pengfei Li (5):
mm, slab: Make kmalloc_info[] contain all types of names
mm, slab_common: Remove unused kmalloc_cache_name()
mm, slab: Remove unused kmalloc_size()
mm, slab_common: Make 'type' is enum kmalloc_cache
kmalloc to save
the time spent dynamically generating names.
Signed-off-by: Pengfei Li
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm/slab_common.c | 76 +++-
3 files changed, 51 insertions(+), 29 deletions(-)
diff --git a/mm/slab.c b/mm
Since the name of kmalloc can be obtained from kmalloc_info[],
remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 15 ---
1 file changed, 15 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 7bd88cc09987
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 20
mm/slab.c| 5 +++--
mm/slab_common.c | 5 ++---
3 files changed, 5 insertions(+), 25
The 'type' of the function new_kmalloc_cache should be
enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 8b
kmalloc_caches[KMALLOC_NORMAL][0] will never be initialized,
so the loop should start at 1 instead of 0
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/slab_common.c b/mm/slab_common.c
index af45b5278fdc..c81fc7dc2946 100644
This patch cleans up the if(page).
No functional change.
Signed-off-by: Pengfei Li
---
mm/page_alloc.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 272c6de1bf4e..51f056ac09f5 100644
--- a/mm
On Thu, Sep 5, 2019 at 3:27 AM Christopher Lameter wrote:
>
> On Wed, 4 Sep 2019, Pengfei Li wrote:
>
> > There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM
> > and KMALLOC_DMA.
>
> I only got a few patches of this set. Can I see the complete patchset
>
On Thu, Sep 5, 2019 at 8:25 PM Vlastimil Babka wrote:
>
> On 9/3/19 6:04 PM, Pengfei Li wrote:
> > There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM
> > and KMALLOC_DMA.
> >
> > The name of KMALLOC_NORMAL is contained in kmalloc_info[].name,
> &
On Tue, Sep 10, 2019 at 6:26 PM Vlastimil Babka wrote:
>
> On 9/10/19 3:26 AM, Pengfei Li wrote:
> > KMALLOC_DMA will be initialized only if KMALLOC_NORMAL with
> > the same index exists.
> >
> > And kmalloc_caches[KMALLOC_NORMAL][0] is always NULL.
> >
>
create_kmalloc_caches270 148-122
kmalloc_info 432 8-424
Total: Before=14874616, After=14873867, chg -0.01%
Pengfei Li (7):
mm, slab: Make kmalloc_info[] contain all types of names
mm, slab: Remove unused kmalloc_size()
mm
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm/slab_common.c | 91
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
include/linux/slab.h | 20
mm/slab.c| 5 +++--
mm/slab_common.c
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a
6
kmalloc_cache_name57 - -57
new_kmalloc_cache112 --112
kmalloc_info 432 8-424
Total: Before=14874616, After=14874375, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 96 ++
6
kmalloc_cache_name57 - -57
new_kmalloc_cache112 --112
kmalloc_info 432 8-424
Total: Before=14874616, After=14874375, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 96 ++
ased on this fact, I think it is okay to initialize KMALLOC_DMA
before "slab_state = UP".
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 35 ---
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.
This is a preparation patch, just replace 0 with ZERO_SIZE_ALLOC
as the return value of zero sized requests.
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index
This is a preparation patch, just replace 0 with ZERO_SIZE_ALLOC
as the return value of zero sized requests.
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index
ased on this fact, I think it is okay to initialize KMALLOC_DMA
before "slab_state = UP".
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 35 ---
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.
955 934 -21
Total: Before=14874316, After=14873867, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 6 +++---
mm/slab.c| 4 ++--
mm/slab_common.c | 8
mm/slub.c| 12 ++--
4 files changed, 15 insertions
955 934 -21
Total: Before=14874316, After=14873867, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 6 +++---
mm/slab.c| 4 ++--
mm/slab_common.c | 8
mm/slub.c| 12 ++--
4 files changed, 15 insertions
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm/slab_common.c | 91
create_kmalloc_caches270 148-122
kmalloc_info 432 8-424
Total: Before=14874616, After=14873867, chg -0.01%
Pengfei Li (7):
mm, slab: Make kmalloc_info[] contain all types of names
mm, slab: Remove unused kmalloc_size()
mm
ased on this fact, I think it is okay to initialize KMALLOC_DMA
before "slab_state = UP".
Signed-off-by: Pengfei Li
---
mm/slab_common.c | 35 ---
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/mm/slab_common.c b/mm/slab_common.
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
include/linux/slab.h | 20
mm/slab.c| 5 +++--
mm/slab_common.c
6
kmalloc_cache_name57 - -57
new_kmalloc_cache112 --112
kmalloc_info 432 8-424
Total: Before=14874616, After=14874375, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 96 ++
955 934 -21
Total: Before=14874316, After=14873867, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 6 +++---
mm/slab.c| 4 ++--
mm/slab_common.c | 8
mm/slub.c| 12 ++--
4 files changed, 15 insertions
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a
This is a preparation patch, just replace 0 with ZERO_SIZE_ALLOC
as the return value of zero sized requests.
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/slab.h b/include/linux/slab.h
index
- -57
create_kmalloc_caches270 195 -75
new_kmalloc_cache112 --112
kmalloc_info 432 8-424
Total: Before=14789209, After=14788507, chg -0.00%
Pengfei Li (7):
mm, slab: Make
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm
This is a preparation patch, just replace 0 with ZERO_SIZE_ALLOC
as the return value of zero sized requests.
Signed-off-by: Pengfei Li
Acked-by: David Rientjes
---
include/linux/slab.h | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/include/linux/slab.h b
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
include/linux/slab.h | 20
mm/slab.c| 5
6
kmalloc_cache_name57 - -57
new_kmalloc_cache112 --112
kmalloc_info 432 8-424
Total: Before=14789209, After=14788968, chg -0.00%
Signed-off-by: Pengfei Li
---
include/linux/slab.h | 96 ++
).
And I found that for SLAB, KMALLOC_DMA is initialized before
"slab_state = UP". But for SLUB, KMALLOC_DMA is initialized after
"slab_state = UP".
Based on this fact, I think it is okay to initialize KMALLOC_DMA
before "slab_state = UP".
Sig
955 934 -21
Total: Before=14788957, After=14788507, chg -0.00%
Signed-off-by: Pengfei Li
Acked-by: David Rientjes
---
include/linux/slab.h | 6 +++---
mm/slab.c| 4 ++--
mm/slab_common.c | 8
mm/slub.c| 12 ++--
4 files
On Mon, Sep 16, 2019 at 5:38 AM David Rientjes wrote:
>
> On Mon, 16 Sep 2019, Pengfei Li wrote:
>
> > There are three types of kmalloc, KMALLOC_NORMAL, KMALLOC_RECLAIM
> > and KMALLOC_DMA.
> >
> > The name of KMALLOC_NORMAL is contained in kmalloc_
On Mon, Sep 16, 2019 at 5:38 AM David Rientjes wrote:
Thanks for your review comments!
>
> On Mon, 16 Sep 2019, Pengfei Li wrote:
>
> > diff --git a/mm/slab_common.c b/mm/slab_common.c
> > index 2aed30deb071..e7903bd28b1f 100644
> > --- a/mm/slab_common.c
rop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Pengfei-Li/mm-slab-Make-kmalloc_info-contain-all-types-of-names/20190916-065820
> config: parisc-allmodconfig (attached as .config)
> compiler: hppa-linux-gcc (GCC)
please drop us a note to
> help improve the system]
>
> url:
> https://github.com/0day-ci/linux/commits/Pengfei-Li/mm-slab-Make-kmalloc_info-contain-all-types-of-names/20190916-065820
> reproduce:
> # apt-get install sparse
> # sparse version: v0.6.1-rc
On Tue, Sep 17, 2019 at 12:04 AM Christopher Lameter 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_c
move them to make the world greener.
>
> Adding Pengfei Li who has been working on a patchset for modified handling
> of kmalloc cache initialization and touches the resiliency test.
>
Thanks for looping me in.
My opinion is the same as David Rientjes.
The resiliency test should not be rem
On Mon, Sep 16, 2019 at 5:38 AM David Rientjes wrote:
>
> On Mon, 16 Sep 2019, Pengfei Li wrote:
>
> > Currently, kmalloc_cache[] is not sorted by size, kmalloc_cache[0]
> > is kmalloc-96, kmalloc_cache[1] is kmalloc-192 (when ARCH_DMA_MINALIGN
> > is not define
On Thu, Oct 3, 2019 at 7:06 AM Andrew Morton wrote:
>
> On Mon, 23 Sep 2019 20:27:25 +0800 Pengfei Li wrote:
>
> > Changes in v6
> > --
> > 1. abandon patch 4-7 (Because there is not enough reason to explain
> > that they are beneficial)
>
> So http://l
()
(CPU cycles)
5.3-rc7 66264
5.3-rc7+patch42188
Pengfei Li (3):
mm, slab: Make kmalloc_info[] contain all types of names
mm, slab: Remove unused kmalloc_size()
mm, slab_common: Use enum kmalloc_cache_type to iterate over kmalloc
kmalloc to save
the time spent dynamically generating names.
Besides, remove the kmalloc_cache_name() that is no longer used.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
mm/slab.c| 2 +-
mm/slab.h| 2 +-
mm
The type of local variable *type* of new_kmalloc_cache() should
be enum kmalloc_cache_type instead of int, so correct it.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
mm/slab_common.c | 5 +++--
1 file changed, 3 insertions(+), 2
The size of kmalloc can be obtained from kmalloc_info[],
so remove kmalloc_size() that will not be used anymore.
Signed-off-by: Pengfei Li
Acked-by: Vlastimil Babka
Acked-by: Roman Gushchin
Acked-by: David Rientjes
---
include/linux/slab.h | 20
mm/slab.c| 5
On Mon, Aug 19, 2019 at 9:50 PM Vlastimil Babka wrote:
>
> On 8/17/19 12:51 PM, Pengfei Li wrote:
> > This patch cleans up the if(page).
> >
> > No functional change.
> >
> > Signed-off-by: Pengfei Li
>
> I don't see much benefit here. The indentat
Hi, Vlad
Thanks for the comments form you and Matthew, now I am sure
v3 is enough.
I will follow the next version of your "mm/vmalloc: do not
keep unpurged areas in the busy tree".
Thanks again for your patience with me!
--
Pengfei
f struct vmap_area wasted space.
After applying this commit, sizeof(struct vmap_area) has been
reduced from 11 words to 8 words.
Pengfei Li (1):
mm/vmalloc: modify struct vmap_area to reduce its size
Uladzislau Rezki (Sony) (1):
mm/vmalloc: do not keep unpurged areas in the busy tree
inc
From: "Uladzislau Rezki (Sony)"
The busy tree can be quite big, even though the area is freed
or unmapped it still stays there until "purge" logic removes
it.
1) Optimize and reduce the size of "busy" tree by removing a
node from it right away as soon as user triggers free paths.
It is possible
ags".
Since only one flag VM_VM_AREA is being used, and the same
thing can be done by judging whether "vm" is NULL, then the
"flags" can be eliminated.
Signed-off-by: Pengfei Li
Suggested-by: Uladzislau Rezki (Sony)
---
include/linux/vmalloc.h | 20 +---
m
On Tue, Jul 16, 2019 at 10:35 PM Uladzislau Rezki wrote:
>
> On Tue, Jul 16, 2019 at 09:26:04PM +0800, Pengfei Li wrote:
> > Objective
> > -
> > The current implementation of struct vmap_area wasted space.
> >
> > After applying this commit, sizeof(st
y overwriting va_start.
The current implementation of struct vmap_area wasted space.
After applying this commit, sizeof(struct vmap_area) has been
reduced from 11 words to 8 words.
Pengfei Li (1):
mm/vmalloc: modify struct vmap_area to reduce its size
Uladzislau Rezki (Sony) (1):
mm/vmalloc
ags".
Since only one flag VM_VM_AREA is being used, and the same
thing can be done by judging whether "vm" is NULL, then the
"flags" can be eliminated.
Signed-off-by: Pengfei Li
Suggested-by: Uladzislau Rezki (Sony)
---
include/linux/vmalloc.h | 20 +---
m
From: "Uladzislau Rezki (Sony)"
The busy tree can be quite big, even though the area is freed
or unmapped it still stays there until "purge" logic removes
it.
1) Optimize and reduce the size of "busy" tree by removing a
node from it right away as soon as user triggers free paths.
It is possible
On Fri, Jul 26, 2019 at 5:36 PM Rasmus Villemoes
wrote:
>
> On 25/07/2019 20.42, Pengfei Li wrote:
> > Because "order" will never be negative in __rmqueue_fallback(),
> > so just make "order" unsigned int.
> > And modify trace_mm_page_alloc_extf
On Fri, Jul 26, 2019 at 3:26 PM Mel Gorman wrote:
>
Thank you for your comments.
> On Fri, Jul 26, 2019 at 02:42:43AM +0800, Pengfei Li wrote:
> > Objective
> >
> > The motivation for this series of patches is use unsigned int for
> > "order" in
On Fri, Jul 26, 2019 at 3:12 PM Michal Hocko wrote:
>
Thank you for your comments.
> On Fri 26-07-19 07:48:36, Pengfei Li wrote:
> [...]
> > For the benefit, "order" may be negative, which is confusing and weird.
>
> order = -1 has a special meaning.
>
Yes. Bu
From: "Uladzislau Rezki (Sony)"
The busy tree can be quite big, even though the area is freed
or unmapped it still stays there until "purge" logic removes
it.
1) Optimize and reduce the size of "busy" tree by removing a
node from it right away as soon as user triggers free paths.
It is possible
message.
* patch 5: Let va->flags use only some low bits of va_start
instead of completely overwriting va_start.
The current implementation of struct vmap_area wasted space.
After applying this commit, sizeof(struct vmap_area) has been
reduced from 11 words to 8 words.
Pengfei
n be packed with other variables,
which are only used in rbtree and list sorted by address.
3) Eliminate "flags".
Since only one flag VM_VM_AREA is being used, and the same
thing can be done by judging whether "vm" is NULL, then the
"flags"
On Fri, Jul 12, 2019 at 9:49 PM Matthew Wilcox wrote:
>
> On Fri, Jul 12, 2019 at 08:02:13PM +0800, Pengfei Li wrote:
>
> I don't think you need struct union struct union. Because llist_node
> is just a pointer, you can get the same savings with just:
>
> union
Thanks.
Signed-off-by: Pengfei Li
On Thu, Jul 25, 2019 at 10:36 AM Andrew Morton
wrote:
>
> On Tue, 16 Jul 2019 23:26:55 +0800 Pengfei Li wrote:
>
> > From: "Uladzislau Rezki (Sony)"
> >
> > The busy tree can be quite big, even though the area is freed
Like another should_compact_retry(), use unsigned int for "order".
And modify trace_compact_retry() accordingly.
Signed-off-by: Pengfei Li
---
include/trace/events/oom.h | 6 +++---
mm/page_alloc.c| 7 +++
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git
stress testing locally and have not found any problems.
In addition, local tests indicate no performance impact.
Pengfei Li (10):
mm/page_alloc: use unsigned int for "order" in should_compact_retry()
mm/page_alloc: use unsigned int for "order" in __rmqueue_fallback()
mm/pa
Because "order" will never be negative in __rmqueue_fallback(),
so just make "order" unsigned int.
And modify trace_mm_page_alloc_extfrag() accordingly.
Signed-off-by: Pengfei Li
---
include/trace/events/kmem.h | 6 +++---
mm/page_alloc.c | 4 ++--
2 files c
The "order" will never be used in alloc_contig_range(), and "order"
is a negative number is very strange. So just remove it.
Signed-off-by: Pengfei Li
---
mm/page_alloc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 7d47af09461f.
ed int, and after
reverting fast_search_fail to unsigned int, compact_control is still
within two cache lines.
Signed-off-by: Pengfei Li
---
mm/compaction.c | 96 +
mm/internal.h | 6 ++--
2 files changed, 53 insertions(+), 49 deletions(-)
diff
Make the same type as "compact_control->order".
Signed-off-by: Pengfei Li
---
include/trace/events/compaction.h | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/trace/events/compaction.h
b/include/trace/events/compaction.h
index
Because "order" will never be negative in should_compact_retry(),
so just make "order" unsigned int.
Signed-off-by: Pengfei Li
---
mm/page_alloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1432cbcd87cd.
Because "compact_order_failed" will never be negative, so just
make it unsigned int. And modify three related trace functions
accordingly.
Signed-off-by: Pengfei Li
---
include/linux/compaction.h| 12 ++--
include/linux/mmzone.h| 2 +-
include/tr
Since compact_control->order and compact_control->search_order
have been modified to unsigned int in the previous commit, then
some of the functions in compaction.c are modified accordingly.
Signed-off-by: Pengfei Li
---
include/linux/compaction.h | 12 ++--
mm/compac
Because "kswapd_order" will never be negative, so just make it
unsigned int. And modify wakeup_kswapd(), kswapd_try_to_sleep()
and trace_mm_vmscan_kswapd_wake() accordingly.
Besides, make "order" unsigned int in two related trace functions.
Signed-off-by: Pengfei Li
---
in
Because "kcompactd_max_order" will never be negative, so just
make it unsigned int.
Signed-off-by: Pengfei Li
---
include/linux/compaction.h | 6 --
include/linux/mmzone.h | 2 +-
mm/compaction.c| 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git
On Fri, Jul 26, 2019 at 2:58 AM Matthew Wilcox wrote:
>
> On Fri, Jul 26, 2019 at 02:42:44AM +0800, Pengfei Li wrote:
> > static inline bool
> > -should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
> > - enum compa
On Fri, Jul 26, 2019 at 2:52 AM Qian Cai wrote:
>
> On Fri, 2019-07-26 at 02:42 +0800, Pengfei Li wrote:
> > Objective
> >
> > The motivation for this series of patches is use unsigned int for
> > "order" in compaction.c, just like in other memory subs
On Mon, Jul 29, 2019 at 4:34 PM Mel Gorman wrote:
>
> On Sun, Jul 28, 2019 at 12:44:36AM +0800, Pengfei Li wrote:
> > On Fri, Jul 26, 2019 at 3:26 PM Mel Gorman
> > wrote:
> > >
> >
> > Thank you for your comments.
> >
> > > On F
Like commit 40cacbcb3240 ("mm, compaction: remove unnecessary zone
parameter in some instances"), remove unnecessary zone parameter.
No functional change.
Signed-off-by: Pengfei Li
---
mm/compaction.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff
Rename function __find_vmap_area to __search_va_in_busy_tree to
indicate that it is searching in the *BUSY* tree.
Signed-off-by: Pengfei Li
---
mm/vmalloc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index a5065fcb74d3..b6ea52d6e8f9
1 - 100 of 118 matches
Mail list logo