Linux Documentation
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Jane Chu <jane.chu@oracle.com>, akpm@linux-foundation.org
Cc: willy@infradead.org, jack@suse.cz, viro@zeniv.linux.org.uk,
	brauner@kernel.org, muchun.song@linux.dev, osalvador@suse.de,
	hughd@google.com, baolin.wang@linux.alibaba.com,
	linmiaohe@huawei.com, nao.horiguchi@gmail.com,
	lorenzo@kernel.org, rppt@kernel.org, peterx@redhat.com,
	corbet@lwn.net, linux-doc@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v2 02/11] mm: factor out adjust_range_hwpoison() from hugetlbfs
Date: Fri, 19 Jun 2026 16:52:18 +0200	[thread overview]
Message-ID: <92c3a198-98ad-47c3-a5aa-24db52109b06@kernel.org> (raw)
In-Reply-To: <20260617172534.1740152-3-jane.chu@oracle.com>

On 6/17/26 19:25, Jane Chu wrote:
> The functionality and implementation of adjust_range_hwpoison() is
> generic, so factor it out and make it ready for generic use.
> 
> [1] https://lore.kernel.org/linux-mm/aeZwAz6PcdlqSnJ2@casper.infradead.org/
> 
> Suggested-by: Matthew Wilcox <willy@infradead.org>
> Signed-off-by: Jane Chu <jane.chu@oracle.com>
> ---

[...]

> -/*
> - * Check if a given raw @page is HWPOISON in a folio of any kind
> - */
> -bool is_raw_hwpoison_page_in_folio(struct page *page);
> -
>  static inline unsigned long huge_page_mask_align(struct file *file)
>  {
>  	return PAGE_MASK & ~huge_page_mask(hstate_file(file));
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 4e636647100c..a27ce4ad6247 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2753,6 +2753,37 @@ static void filemap_end_dropbehind_read(struct folio *folio)
>  	}
>  }
>  
> +/**
> + * adjust_range_hwpoison - adjust clean readable range to avoid hwpoison.
> + * @folio: folio that contains hwpoison(s).
> + * @offset: bytes into the folio where subsequent read starts.
> + * @bytes: number of bytes wish to read.
> + *
> + * Return: adjusted total number of bytes starting off @offset that can be

s/off/at/ ?


Apart from that, lgtm

-- 
Cheers,

David

  reply	other threads:[~2026-06-19 14:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 17:25 [PATCH v2 00/11] hugetlb: Use PAGE granularity index in exported i/f and adopt the common read_iter Jane Chu
2026-06-17 17:25 ` [PATCH v2 01/11] mm/memory-failure: make is_raw_hwpoison_page_in_hugepage() general purpose Jane Chu
2026-06-19 14:49   ` David Hildenbrand (Arm)
2026-06-17 17:25 ` [PATCH v2 02/11] mm: factor out adjust_range_hwpoison() from hugetlbfs Jane Chu
2026-06-19 14:52   ` David Hildenbrand (Arm) [this message]
2026-06-17 17:25 ` [PATCH v2 03/11] mm/filemap: add hwpoison handling to filemap_read() Jane Chu
2026-06-17 17:25 ` [PATCH v2 04/11] hugetlbfs,filemap: replace hugetlbfs_read_iter() with generic_file_read_iter() Jane Chu
2026-06-17 20:07   ` Matthew Wilcox
2026-06-17 17:25 ` [PATCH v2 05/11] hugetlb: Convert the vmf->pgoff to PAGE_SIZE granularity Jane Chu
2026-06-17 22:28   ` Matthew Wilcox
2026-06-17 17:25 ` [PATCH v2 06/11] hugetlb: make hugetlb_fault_mutex_hash() to take PAGE_SIZE index Jane Chu
2026-06-18  3:17   ` Matthew Wilcox
2026-06-17 17:25 ` [PATCH v2 07/11] hugetlb: replace filemap_lock_hugetlb_folio with filemap_lock_folio Jane Chu
2026-06-18 16:16   ` Usama Arif
2026-06-17 17:25 ` [PATCH v2 08/11] hugetlb: make hugetlb_add_to_page_cache() to take PAGE_SIZE granularity index Jane Chu
2026-06-17 17:25 ` [PATCH v2 09/11] hugetlb: remove the hugetlb_linear_page_index() helper Jane Chu
2026-06-17 17:25 ` [PATCH v2 10/11] hugetlb: drop vma_hugecache_offset() in favor of linear_page_index() Jane Chu
2026-06-17 17:25 ` [PATCH v2 11/11] hugetlb: make hugetlb_[un]reserve_pages() to take PAGE granularity index Jane Chu
2026-06-17 18:28 ` [PATCH v2 00/11] hugetlb: Use PAGE granularity index in exported i/f and adopt the common read_iter Mike Rapoport

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=92c3a198-98ad-47c3-a5aa-24db52109b06@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=brauner@kernel.org \
    --cc=corbet@lwn.net \
    --cc=hughd@google.com \
    --cc=jack@suse.cz \
    --cc=jane.chu@oracle.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=nao.horiguchi@gmail.com \
    --cc=osalvador@suse.de \
    --cc=peterx@redhat.com \
    --cc=rppt@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox