On Fri, Jul 07, 2023 at 02:55:33PM -0700, Axel Rasmussen wrote:
-static inline swp_entry_t make_swapin_error_entry(void) +static inline swp_entry_t make_poisoned_swp_entry(void) {
- return make_pte_marker_entry(PTE_MARKER_SWAPIN_ERROR);
- return make_pte_marker_entry(PTE_MARKER_POISONED);
} -static inline int is_swapin_error_entry(swp_entry_t entry) +static inline int is_poisoned_swp_entry(swp_entry_t entry) { return is_pte_marker_entry(entry) &&
(pte_marker_get(entry) & PTE_MARKER_SWAPIN_ERROR);
(pte_marker_get(entry) & PTE_MARKER_POISONED);
}
These two can be slightly confusing when put together with hwpoison entries, so maybe it'll be good to somehow attach a "marker" inside the names:
make_poisoned_marker_entry() is_pointed_marker_entry()
(the old helpers didn't attach a "marker" keyword because we started with consuming a swp entry type, I think)
But we can still identify easily with "hw" prefix being there or not, so it's still pretty clear at least to me. I'd say not worth a repost, so your call to keep or change, just in case a new version for other reasons. All fine here now:
Acked-by: Peter Xu peterx@redhat.com
Thanks,