Re: [PATCH 2/2] mm: shmem: improve the tmpfs large folio read performance
From: Matthew Wilcox
Date: Wed Oct 16 2024 - 11:38:06 EST
On Wed, Oct 16, 2024 at 06:09:30PM +0800, Baolin Wang wrote:
> @@ -3128,8 +3127,9 @@ static ssize_t shmem_file_read_iter(struct kiocb *iocb, struct iov_iter *to)
> if (folio) {
> folio_unlock(folio);
>
> - page = folio_file_page(folio, index);
> - if (PageHWPoison(page)) {
> + if (folio_test_hwpoison(folio) ||
> + (folio_test_large(folio) &&
> + folio_test_has_hwpoisoned(folio))) {
Hm, so if we have hwpoison set on one page in a folio, we now can't read
bytes from any page in the folio? That seems like we've made a bad
situation worse.