mm: slub: do not warn when allocating slab obj extensions fails
Subsystems (2)
PATCH 1/1 mm: slub: do not warn when allocating slab obj extensions fails
In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Failing this allocation is not indicative of a bug, so remove the warning.
---
v1 -> v2:
- remove the warning completely. We will have a way in the future to indicate that the mem alloc profile is inaccurate.
--- mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
mm/slub.c +1 -3
@@ -2102,9 +2102,7 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) slab =virt_to_slab (p);if (!slab_obj_exts (slab) && -WARN (alloc_slab_obj_exts (slab, s, flags, false), -"%s, %s: Failed to create slab extension vector!\n" , - __func__, s->name)) +alloc_slab_obj_exts (slab, s, flags, false))return NULL ;return slab_obj_exts (slab) +obj_to_index (s, slab, p);
Signature · 1 line
2.47.1
Quoted 22 lines · Usama Arif
In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Failing this allocation is not indicative of a bug, so remove the warning.
Signed-off-by Usama Arif <[email protected]>Reported-by Vlad Poenaru <[email protected]>---
v1 -> v2:
- remove the warning completely. We will have a way in the future to indicate that the mem alloc profile is inaccurate.--- mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)mm/slub.c +0
-0
mm/slub.c prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) · line 2105
Quoted 7 lines
mm/slub.c +1
-3@@ -2102,9 +2102,7 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) slab =virt_to_slab (p);if (!slab_obj_exts (slab) && -WARN (alloc_slab_obj_exts (slab, s, flags, false), -"%s, %s: Failed to create slab extension vector!\n" , - __func__, s->name)) +alloc_slab_obj_exts (slab, s, flags, false))
I thought we agreed to having pr_warn_once() here. Did I miss something?
Quoted 6 lines
mm/slub.c +0
-1return NULL ;return slab_obj_exts (slab) +obj_to_index (s, slab, p); --2.47.1
Quoted 24 lines · Suren Baghdasaryan
Quoted 23 lines · Usama Arif
In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Failing this allocation is not indicative of a bug, so remove the warning.
Signed-off-by Usama Arif <[email protected]>Reported-by Vlad Poenaru <[email protected]>---
v1 -> v2:
- remove the warning completely. We will have a way in the future to indicate that the mem alloc profile is inaccurate.--- mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)mm/slub.c +0
-0@@ -2102,9 +2102,7 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p)
Quoted 9 lines
mm/slub.c prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) · line 2105
Quoted 6 lines
mm/slub.c +1
-3slab =virt_to_slab (p);if (!slab_obj_exts (slab) && -WARN (alloc_slab_obj_exts (slab, s, flags, false), -"%s, %s: Failed to create slab extension vector!\n" , - __func__, s->name)) +alloc_slab_obj_exts (slab, s, flags, false))I thought we agreed to having
pr_warn_once()here. Did I miss something?
I had [1] yesterday but I saw Johannes's mail [2] in and Harry mentioned in [3] that failing to allocate the extension vector can happen during normal operations. So I thought maybe there are more votes for removing it.
I am ok with either pr_warn_once or removing it completely.
I guess the question is, is it considered OK to fail here?
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/[email protected]/
[3] https://lore.kernel.org/all/[email protected]/
Quoted 38 lines · Usama Arif
Quoted 24 lines · Suren Baghdasaryan
Quoted 23 lines · Usama Arif
In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Failing this allocation is not indicative of a bug, so remove the warning.
Signed-off-by Usama Arif <[email protected]>Reported-by Vlad Poenaru <[email protected]>---
v1 -> v2:
- remove the warning completely. We will have a way in the future to indicate that the mem alloc profile is inaccurate.--- mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)mm/slub.c +0
-0@@ -2102,9 +2102,7 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p)Quoted 9 lines
mm/slub.c prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) · line 2105
Quoted 6 lines
mm/slub.c +1
-3slab =virt_to_slab (p);if (!slab_obj_exts (slab) && -WARN (alloc_slab_obj_exts (slab, s, flags, false), -"%s, %s: Failed to create slab extension vector!\n" , - __func__, s->name)) +alloc_slab_obj_exts (slab, s, flags, false))I thought we agreed to having
pr_warn_once()here. Did I miss something?
Quoted 5 lines
I had [1] yesterday but I saw Johannes's mail [2] in and Harry mentioned in [3] that failing to allocate the extension vector can happen during normal operations. So I thought maybe there are more votes for removing it.
I am ok with either
pr_warn_onceor removing it completely.
I feel like we should have at least some indication that something went wrong here.
Quoted 2 lines
I guess the question is, is it considered OK to fail here?
Well, it's not ok but not catastrophic either, so warning seems appropriate to me.
Quoted 45 lines · Suren Baghdasaryan
Quoted 38 lines · Usama Arif
Quoted 24 lines · Suren Baghdasaryan
Quoted 23 lines · Usama Arif
In memory bound systems, a large number of warnings for failing this allocation repeatedly may mask any real issues in the system during memory pressure being reported in dmesg. Failing this allocation is not indicative of a bug, so remove the warning.
Signed-off-by Usama Arif <[email protected]>Reported-by Vlad Poenaru <[email protected]>---
v1 -> v2:
- remove the warning completely. We will have a way in the future to indicate that the mem alloc profile is inaccurate.--- mm/slub.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)mm/slub.c +0
-0@@ -2102,9 +2102,7 @@ prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p)Quoted 9 lines
mm/slub.c prepare_slab_obj_exts_hook(struct kmem_cache *s, gfp_t flags, void *p) · line 2105
Quoted 6 lines
mm/slub.c +1
-3slab =virt_to_slab (p);if (!slab_obj_exts (slab) && -WARN (alloc_slab_obj_exts (slab, s, flags, false), -"%s, %s: Failed to create slab extension vector!\n" , - __func__, s->name)) +alloc_slab_obj_exts (slab, s, flags, false))I thought we agreed to having
pr_warn_once()here. Did I miss something?Quoted 5 lines
I had [1] yesterday but I saw Johannes's mail [2] in and Harry mentioned in [3] that failing to allocate the extension vector can happen during normal operations. So I thought maybe there are more votes for removing it.
I am ok with either
pr_warn_onceor removing it completely.
Quoted 9 lines
I feel like we should have at least some indication that something went wrong here.
Quoted 2 lines
I guess the question is, is it considered OK to fail here?
Well, it's not ok but not catastrophic either, so warning seems appropriate to me.
Ok, I will wait a couple of days incase someone has any objections and send
https://lore.kernel.org/all/[email protected]/
as v3.
Thanks!