diff mbox series

[RFC,v3,1/4] mm/hwpoison: remove MF_MSG_SLAB from action_page_types

Message ID 20221218101901.373450-2-42.hyeyoo@gmail.com (mailing list archive)
State New
Headers show
Series move PG_slab flag to page_type | expand

Commit Message

Hyeonggon Yoo Dec. 18, 2022, 10:18 a.m. UTC
As suggested by Naoya [1], identify_page_state() is never
called when handling memory error on a slab page.

Clean this up before moving PG_slab flag to page_type in later patch.

[1] https://lore.kernel.org/linux-mm/Y2s+dnBsHAJu19ob@hyeyoo/#r

Suggested-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
---
 mm/memory-failure.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

HORIGUCHI NAOYA(堀口 直也) Dec. 20, 2022, 11:53 p.m. UTC | #1
On Sun, Dec 18, 2022 at 07:18:58PM +0900, Hyeonggon Yoo wrote:
> As suggested by Naoya [1], identify_page_state() is never
> called when handling memory error on a slab page.
> 
> Clean this up before moving PG_slab flag to page_type in later patch.
> 
> [1] https://lore.kernel.org/linux-mm/Y2s+dnBsHAJu19ob@hyeyoo/#r
> 
> Suggested-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>

Thank you for the patch,
I think there're a few other places to remove under include/.

  $ grep -inr MF_MSG_SLA include
  include/ras/ras_event.h:359:    EM ( MF_MSG_SLAB, "kernel slab page" )                          \
  include/linux/mm.h:3502:        MF_MSG_SLAB,

, so could you update them together?

Thanks,
Naoya Horiguchi
Andy Shevchenko Dec. 21, 2022, 5 p.m. UTC | #2
On Tue, Dec 20, 2022 at 11:53:11PM +0000, HORIGUCHI NAOYA(堀口 直也) wrote:
> On Sun, Dec 18, 2022 at 07:18:58PM +0900, Hyeonggon Yoo wrote:
> > As suggested by Naoya [1], identify_page_state() is never
> > called when handling memory error on a slab page.
> > 
> > Clean this up before moving PG_slab flag to page_type in later patch.

> > [1] https://lore.kernel.org/linux-mm/Y2s+dnBsHAJu19ob@hyeyoo/#r

You can make it to be a Link: tag.
Hyeonggon Yoo Dec. 29, 2022, 1:17 p.m. UTC | #3
On Tue, Dec 20, 2022 at 11:53:11PM +0000, HORIGUCHI NAOYA(堀口 直也) wrote:
> On Sun, Dec 18, 2022 at 07:18:58PM +0900, Hyeonggon Yoo wrote:
> > As suggested by Naoya [1], identify_page_state() is never
> > called when handling memory error on a slab page.
> > 
> > Clean this up before moving PG_slab flag to page_type in later patch.
> > 
> > [1] https://lore.kernel.org/linux-mm/Y2s+dnBsHAJu19ob@hyeyoo/#r
> > 
> > Suggested-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
> > Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
> 
> Thank you for the patch,
> I think there're a few other places to remove under include/.
> 
>   $ grep -inr MF_MSG_SLA include
>   include/ras/ras_event.h:359:    EM ( MF_MSG_SLAB, "kernel slab page" )                          \
>   include/linux/mm.h:3502:        MF_MSG_SLAB,

> 
> , so could you update them together?

Oh, missed this. Will do in next version.
Hyeonggon Yoo Dec. 29, 2022, 1:18 p.m. UTC | #4
On Wed, Dec 21, 2022 at 07:00:48PM +0200, Andy Shevchenko wrote:
> On Tue, Dec 20, 2022 at 11:53:11PM +0000, HORIGUCHI NAOYA(堀口 直也) wrote:
> > On Sun, Dec 18, 2022 at 07:18:58PM +0900, Hyeonggon Yoo wrote:
> > > As suggested by Naoya [1], identify_page_state() is never
> > > called when handling memory error on a slab page.
> > > 
> > > Clean this up before moving PG_slab flag to page_type in later patch.
> 
> > > [1] https://lore.kernel.org/linux-mm/Y2s+dnBsHAJu19ob@hyeyoo/#r
> 
> You can make it to be a Link: tag.

Will do in next version, thanks!
diff mbox series

Patch

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index c77a9e37e27e..74ad1db989e3 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -783,7 +783,6 @@  static const char *action_name[] = {
 static const char * const action_page_types[] = {
 	[MF_MSG_KERNEL]			= "reserved kernel page",
 	[MF_MSG_KERNEL_HIGH_ORDER]	= "high-order kernel page",
-	[MF_MSG_SLAB]			= "kernel slab page",
 	[MF_MSG_DIFFERENT_COMPOUND]	= "different compound page after locking",
 	[MF_MSG_HUGE]			= "huge page",
 	[MF_MSG_FREE_HUGE]		= "free huge page",
@@ -1146,7 +1145,6 @@  static int me_huge_page(struct page_state *ps, struct page *p)
 #define mlock		(1UL << PG_mlocked)
 #define lru		(1UL << PG_lru)
 #define head		(1UL << PG_head)
-#define slab		(1UL << PG_slab)
 #define reserved	(1UL << PG_reserved)
 
 static struct page_state error_states[] = {
@@ -1156,13 +1154,6 @@  static struct page_state error_states[] = {
 	 * PG_buddy pages only make a small fraction of all free pages.
 	 */
 
-	/*
-	 * Could in theory check if slab page is free or if we can drop
-	 * currently unused objects without touching them. But just
-	 * treat it as standard kernel for now.
-	 */
-	{ slab,		slab,		MF_MSG_SLAB,	me_kernel },
-
 	{ head,		head,		MF_MSG_HUGE,		me_huge_page },
 
 	{ sc|dirty,	sc|dirty,	MF_MSG_DIRTY_SWAPCACHE,	me_swapcache_dirty },
@@ -1189,7 +1180,6 @@  static struct page_state error_states[] = {
 #undef mlock
 #undef lru
 #undef head
-#undef slab
 #undef reserved
 
 /*