lkml.org 
[lkml]   [2020]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: don't rely on system state to detect hot-plug operations
From
Date
>> I am not sure an enum is going to make the existing situation less
>> messy. Sure we somehow have to distinguish boot init and runtime hotplug
>> because they have different constrains. I am arguing that a) we should
>> have a consistent way to check for those and b) we shouldn't blow up
>> easily just because sysfs infrastructure has failed to initialize.
>
> For the point a, using the enum allows to know in register_mem_sect_under_node()
> if the link operation is due to a hotplug operation or done at boot time.
>
> For the point b, one option would be ignore the link error in the case the link
> is already existing, but that BUG_ON() had the benefit to highlight the root issue.
>

WARN_ON_ONCE() would be preferred - not crash the system but still
highlight the issue.

> Cheers,
> Laurent.
>


--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2020-09-09 11:25    [W:0.101 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site