Messages in this thread | | | From | HORIGUCHI NAOYA(堀口 直也) <> | Subject | Re: [PATCH v5 1/1] mm/memory-failure: disable unpoison once hw error happens | Date | Wed, 15 Jun 2022 08:43:45 +0000 |
| |
On Wed, Jun 15, 2022 at 10:21:09AM +0200, David Hildenbrand wrote: > On 15.06.22 10:15, HORIGUCHI NAOYA(堀口 直也) wrote: > > On Wed, Jun 15, 2022 at 10:00:05AM +0800, zhenwei pi wrote: ... > > > > ... > > > >> diff --git a/mm/memory-failure.c b/mm/memory-failure.c > >> index b85661cbdc4a..385b5e99bfc1 100644 > >> --- a/mm/memory-failure.c > >> +++ b/mm/memory-failure.c > >> @@ -69,6 +69,8 @@ int sysctl_memory_failure_recovery __read_mostly = 1; > >> > >> atomic_long_t num_poisoned_pages __read_mostly = ATOMIC_LONG_INIT(0); > >> > >> +static bool hw_memory_failure; > > > > Could you set the initial value explicitly? Using a default value is good, > > but doing as the surrounding code do is better for consistency. And this > > variable can be updated only once, so adding __read_mostly macro is also fine. > > No strong opinion. __read_mostly makes sense, but I assume we don't > really care about performance that much when dealing with HW errors.
That's right, mm/memory-failure.c should be mostly performance insensitive.
- Naoya Horiguchi | |