* + mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix.patch added to mm-unstable branch
@ 2024-11-01 2:02 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-11-01 2:02 UTC (permalink / raw)
To: mm-commits, willy, wangkefeng.wang, shy828301, hughd, dhowells,
david, baolin.wang, akpm
The patch titled
Subject: mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix
has been added to the -mm mm-unstable branch. Its filename is
mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Baolin Wang <baolin.wang@linux.alibaba.com>
Subject: mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix
Date: Fri, 1 Nov 2024 09:56:29 +0800
code layout cleaup, per dhowells
Link: https://lkml.kernel.org/r/32dd938c-3531-49f7-93e4-b7ff21fec569@linux.alibaba.com
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Suggested-by: David Howells <dhowells@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Yang Shi <shy828301@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/mm/shmem.c~mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix
+++ a/mm/shmem.c
@@ -3332,12 +3332,11 @@ static ssize_t shmem_file_splice_read(st
* Fallback to PAGE_SIZE splice if the large folio has hwpoisoned
* pages.
*/
- if (likely(!fallback_page_splice)) {
- size = len;
- } else {
+ size = len;
+ if (unlikely(fallback_page_splice)) {
size_t offset = *ppos & ~PAGE_MASK;
- size = min_t(loff_t, PAGE_SIZE - offset, len);
+ size = umin(size, PAGE_SIZE - offset);
}
part = min_t(loff_t, isize - *ppos, size);
_
Patches currently in -mm which might be from baolin.wang@linux.alibaba.com are
mm-shmem-fix-khugepaged-activation-policy-for-shmem.patch
mm-shmem-update-iocb-ki_pos-directly-to-simplify-tmpfs-read-logic.patch
mm-shmem-improve-the-tmpfs-large-folio-read-performance.patch
mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages.patch
mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-11-01 2:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 2:02 + mm-shmem-fallback-to-page-size-splice-if-large-folio-has-poisoned-pages-fix.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.