On Thu, Sep 30, 2021 at 07:44:48PM +0000, Luck, Tony wrote:
> See the comment above set_mce_nospec() ...
>
> /*
> * Prevent speculative access to the page by either unmapping
> * it (if we do not require access to any part of the page) or
> * marking it uncacheable (if we want to try to retrieve data
> * from non-poisoned lines in the page).
> */
> static inline int set_mce_nospec(unsigned long pfn, bool unmap)
I've seen that comment - I've quoted it upthread...
> It's a choice as to whether the whole page is gone or not. The history for
> this is using pmem as storage. The filesystem block size may be less than
> the page size. An error in a "block" should only result in that block
> disappearing
> from the file, not the surrounding 4k.
So let me cut to the chase:
if (!memory_failure(..))
set_mce_nospec(pfn, whole_page...);
when memory_failure() returns 0, is a whole page marked as hwpoison or
not?
Because I see there close to the top of the function:
if (TestSetPageHWPoison(p)) {
...
after this, that whole page is hwpoison I'd say. Not a cacheline but the
whole thing.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette