Re: [PATCH v4 2/3] PCI/DPC: Run recovery on device that detected the error

2025-06-18 Thread Shuai Xue
在 2025/6/12 18:31, Manivannan Sadhasivam 写道: On Mon, Feb 17, 2025 at 10:42:17AM +0800, Shuai Xue wrote: The current implementation of pcie_do_recovery() assumes that the recovery process is executed on the device that detected the error. s/on/for However, the DPC driver currently passes t

[PATCH] ASoC: imx-card: Add WM8524 support

2025-06-18 Thread Chancel Liu
WM8524 is a stereo DAC. Add support for this codec in imx-card ASoC machine driver. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-card.c | 24 1 file changed, 24 insertions(+) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index ea5dbb54b584..c2c22a

Re: [PATCH 0/3] use vm_flags_t consistently

2025-06-18 Thread Mike Rapoport
On Wed, Jun 18, 2025 at 08:42:51PM +0100, Lorenzo Stoakes wrote: > The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is > exactly equivalent to unsigned long, but it should not be assumed to be. > > Much code that references vma->vm_flags already correctly uses vm_flags_t, >

Re: [PATCH RFC 06/29] mm/zsmalloc: make PageZsmalloc() sticky

2025-06-18 Thread Sergey Senozhatsky
On (25/06/18 19:39), David Hildenbrand wrote: > Let the buddy handle clearing the type. > > Signed-off-by: David Hildenbrand FWIW, Reviewed-by: Sergey Senozhatsky

Re: [PATCH RFC 03/29] mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs

2025-06-18 Thread Sergey Senozhatsky
On (25/06/18 19:39), David Hildenbrand wrote: > Let's drop these checks; these are conditions the core migration code > must make sure will hold either way, no need to double check. > > Signed-off-by: David Hildenbrand Reviewed-by: Sergey Senozhatsky

Re: [PATCH v2 02/14] mm: Filter zone device pages returned from folio_walk_start()

2025-06-18 Thread Alistair Popple
On Tue, Jun 17, 2025 at 11:30:20AM +0200, David Hildenbrand wrote: > On 17.06.25 11:25, David Hildenbrand wrote: > > On 16.06.25 13:58, Alistair Popple wrote: > > > Previously dax pages were skipped by the pagewalk code as pud_special() or > > > vm_normal_page{_pmd}() would be false for DAX pages.

Re: [PATCH v2 6/6] pci/hotplug/pnv_php: Enable third attention indicator

2025-06-18 Thread Timothy Pearson
- Original Message - > From: "Bjorn Helgaas" > To: "Timothy Pearson" > Cc: "linuxppc-dev" , "linux-kernel" > , "linux-pci" > , "Madhavan Srinivasan" , > "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" > , "Bjorn Helgaas" > , "Shawn Anastasio" > Sent: Wednesday, June 18,

Re: [PATCH 2/3] mm: update core kernel code to use vm_flags_t consistently

2025-06-18 Thread Kees Cook
On Wed, Jun 18, 2025 at 08:42:53PM +0100, Lorenzo Stoakes wrote: > The core kernel code is currently very inconsistent in its use of > vm_flags_t vs. unsigned long. This prevents us from changing the type of > vm_flags_t in the future and is simply not correct, so correct this. Thank you for doing

Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken

2025-06-18 Thread Bjorn Helgaas
On Wed, Jun 18, 2025 at 02:50:04PM -0500, Timothy Pearson wrote: > - Original Message - > > From: "Bjorn Helgaas" > > To: "Timothy Pearson" > > Cc: "linuxppc-dev" , "linux-kernel" > > , "linux-pci" > > , "Madhavan Srinivasan" , > > "Michael Ellerman" , > > "christophe leroy" , "Naveen N

Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-06-18 Thread Matthew Wilcox
On Wed, Jun 18, 2025 at 03:25:46PM -0400, Zi Yan wrote: > On 18 Jun 2025, at 15:18, Matthew Wilcox wrote: > >> Why not use page version of lock, unlock, and put? Especially you are > >> thinking about not using folio for these pages. Just a question, > >> I am OK with current patch. > > > > That wo

Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken

2025-06-18 Thread Timothy Pearson
- Original Message - > From: "Bjorn Helgaas" > To: "Timothy Pearson" > Cc: "linuxppc-dev" , "linux-kernel" > , "linux-pci" > , "Madhavan Srinivasan" , > "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" > , "Bjorn Helgaas" > , "Shawn Anastasio" , > "Lukas Wunner" > Sent:

[PATCH 2/3] mm: update core kernel code to use vm_flags_t consistently

2025-06-18 Thread Lorenzo Stoakes
The core kernel code is currently very inconsistent in its use of vm_flags_t vs. unsigned long. This prevents us from changing the type of vm_flags_t in the future and is simply not correct, so correct this. While this results in rather a lot of churn, it is a critical pre-requisite for a future p

[PATCH 3/3] mm: update architecture and driver code to use vm_flags_t

2025-06-18 Thread Lorenzo Stoakes
In future we intend to change the vm_flags_t type, so it isn't correct for architecture and driver code to assume it is unsigned long. Correct this assumption across the board. Overall, this patch does not introduce any functional change. Signed-off-by: Lorenzo Stoakes --- arch/arm/mm/fault.c

[PATCH 1/3] mm: change vm_get_page_prot() to accept vm_flags_t argument

2025-06-18 Thread Lorenzo Stoakes
We abstract the type of the VMA flags to vm_flags_t, however in may places it is simply assumed this is unsigned long, which is simply incorrect. At the moment this is simply an incongruity, however in future we plan to change this type and therefore this change is a critical requirement for doing

[PATCH 0/3] use vm_flags_t consistently

2025-06-18 Thread Lorenzo Stoakes
The VMA flags field vma->vm_flags is of type vm_flags_t. Right now this is exactly equivalent to unsigned long, but it should not be assumed to be. Much code that references vma->vm_flags already correctly uses vm_flags_t, but a fairly large chunk of code simply uses unsigned long and assumes that

Re: [PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken

2025-06-18 Thread Bjorn Helgaas
[+cc Lukas, pciehp expert] On Wed, Jun 18, 2025 at 11:56:54AM -0500, Timothy Pearson wrote: > presence detection (subject/commit wrapping seems to be on all of these patches) > The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system > was observed to incorrectly assert the Prese

Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 15:18, Matthew Wilcox wrote: > On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote: >> On 18 Jun 2025, at 13:39, David Hildenbrand wrote: >>> + /* >>> +* TODO: these pages will not be folios in the future. All >>> +* folio dependencies will have to be removed. >>> +

Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-06-18 Thread Matthew Wilcox
On Wed, Jun 18, 2025 at 03:10:10PM -0400, Zi Yan wrote: > On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > > + /* > > +* TODO: these pages will not be folios in the future. All > > +* folio dependencies will have to be removed. > > +*/ > > + struct folio *folio = page_folio(page

Re: [PATCH v2 5/6] pci/hotplug/pnv_php: Fix surprise plug detection and

2025-06-18 Thread Bjorn Helgaas
On Wed, Jun 18, 2025 at 11:58:23AM -0500, Timothy Pearson wrote: > recovery Same weird subject/commit wrapping. > The existing PowerNV hotplug code did not handle suprise plug events > correctly, leading to a complete failure of the hotplug system after > device removal and a required reboot to

Re: [PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > ... and factor the complete handling of movable_ops pages out. > Convert it similar to isolate_movable_ops_page(). > > While at it, convert the VM_BUG_ON_FOLIO() into a VM_WARN_ON_PAGE(). > > Signed-off-by: David Hildenbrand > --- > mm/migrate

Re: [PATCH v2 6/6] pci/hotplug/pnv_php: Enable third attention indicator

2025-06-18 Thread Bjorn Helgaas
On Wed, Jun 18, 2025 at 11:58:59AM -0500, Timothy Pearson wrote: > state Weird wrapping of last word of subject to here. > The PCIe specification allows three attention indicator states, > on, off, and blink. Enable all three states instead of basic > on / off control. > > Signed-off-by: Timot

Re: [PATCH RFC 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 14:39, Matthew Wilcox wrote: > On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote: >> On 18 Jun 2025, at 13:39, David Hildenbrand wrote: >> >>> ... and start moving back to per-page things that will absolutely not be >>> folio things in the future. Add documentation and a co

Re: [PATCH RFC 06/29] mm/zsmalloc: make PageZsmalloc() sticky

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > Let the buddy handle clearing the type. Same comment as Patch 5. > > Signed-off-by: David Hildenbrand > --- > mm/zpdesc.h | 5 - > mm/zsmalloc.c | 3 +-- > 2 files changed, 1 insertion(+), 7 deletions(-) > Acked-by: Zi Yan Best Regar

Re: [PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > Let the buddy handle clearing the type. The below might be more precise? Since page type is cleared before the page reaches buddy code. Let the free page routine handle clearing the type. > > Signed-off-by: David Hildenbrand > --- > include

Re: [PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > Let's allow for not clearing a page type before freeing a page to the > buddy. > > We'll focus on having a type set on the first page of a larger > allocation only. > > With this change, we can reliably identify typed folios even though > they m

Re: [PATCH RFC 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-06-18 Thread Matthew Wilcox
On Wed, Jun 18, 2025 at 02:14:15PM -0400, Zi Yan wrote: > On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > > > ... and start moving back to per-page things that will absolutely not be > > folio things in the future. Add documentation and a comment that the > > remaining folio stuff (lock, refc

Re: [PATCH RFC 03/29] mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > Let's drop these checks; these are conditions the core migration code > must make sure will hold either way, no need to double check. > > Signed-off-by: David Hildenbrand > --- > mm/zpdesc.h | 5 - > mm/zsmalloc.c | 5 - > 2 files ch

Re: [PATCH RFC 01/29] mm/balloon_compaction: we cannot have isolated pages in the balloon list

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > The core will set PG_isolated only after mops->isolate_page() was > called. In case of the balloon, that is where we will remove it from > the balloon list. So we cannot have isolated pages in the balloon list. > > Let's drop this unnecessary ch

Re: [PATCH RFC 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > ... and start moving back to per-page things that will absolutely not be > folio things in the future. Add documentation and a comment that the > remaining folio stuff (lock, refcount) will have to be reworked as well. > > While at it, convert t

Re: [PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 14:06, Matthew Wilcox wrote: > On Wed, Jun 18, 2025 at 02:04:18PM -0400, Zi Yan wrote: >>> Let's allow for not clearing a page type before freeing a page to the >>> buddy. >>> >>> We'll focus on having a type set on the first page of a larger >>> allocation only. >>> >>> With th

Re: [PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 14:04, Zi Yan wrote: > On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > >> Let's allow for not clearing a page type before freeing a page to the >> buddy. >> >> We'll focus on having a type set on the first page of a larger >> allocation only. >> >> With this change, we can

Re: [PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread Matthew Wilcox
On Wed, Jun 18, 2025 at 02:04:18PM -0400, Zi Yan wrote: > > Let's allow for not clearing a page type before freeing a page to the > > buddy. > > > > We'll focus on having a type set on the first page of a larger > > allocation only. > > > > With this change, we can reliably identify typed folios ev

Re: [PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread Zi Yan
On 18 Jun 2025, at 13:39, David Hildenbrand wrote: > Let's allow for not clearing a page type before freeing a page to the > buddy. > > We'll focus on having a type set on the first page of a larger > allocation only. > > With this change, we can reliably identify typed folios even though > they m

[PATCH RFC 28/29] mm/balloon_compaction: "movable_ops" doc updates

2025-06-18 Thread David Hildenbrand
Let's bring the docs up-to-date. Setting PG_movable_ops + page->private very likely still requires to be performed under documented locks: it's complicated. We will rework this in the future, as we will try avoiding using the page lock. Signed-off-by: David Hildenbrand --- include/linux/balloon

[PATCH RFC 21/29] mm: rename PG_isolated to PG_movable_ops_isolated

2025-06-18 Thread David Hildenbrand
Let's rename the flag to make it clearer where it applies (not folios ...). While at it, define the flag only with CONFIG_MIGRATION. Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 16 +++- mm/compaction.c| 2 +- mm/migrate.c | 14 +++

[PATCH RFC 26/29] mm: rename PAGE_MAPPING_* to FOLIO_MAPPING_*

2025-06-18 Thread David Hildenbrand
Now that the mapping flags are only used for folios, let's rename the defines. Signed-off-by: David Hildenbrand --- fs/proc/page.c | 4 ++-- include/linux/fs.h | 2 +- include/linux/mm_types.h | 1 - include/linux/page-flags.h | 20 ++-- include/linux/pag

[PATCH RFC 25/29] mm: simplify folio_expected_ref_count()

2025-06-18 Thread David Hildenbrand
Now that PAGE_MAPPING_MOVABLE is gone, we can simplify and rely on the folio_test_anon() test only. ... but staring at the users, this function should never even have been called on movable_ops pages. E.g., * __buffer_migrate_folio() does not make sense for them * folio_migrate_mapping() does not

[PATCH RFC 29/29] mm/balloon_compaction: provide single balloon_page_insert() and balloon_mapping_gfp_mask()

2025-06-18 Thread David Hildenbrand
Let's just special-case based on IS_ENABLED(CONFIG_BALLOON_COMPACTION like we did for balloon_page_finalize(). Signed-off-by: David Hildenbrand --- include/linux/balloon_compaction.h | 42 +++--- 1 file changed, 15 insertions(+), 27 deletions(-) diff --git a/include/linu

[PATCH RFC 27/29] docs/mm: convert from "Non-LRU page migration" to "movable_ops page migration"

2025-06-18 Thread David Hildenbrand
Let's bring the docs up-to-date. Signed-off-by: David Hildenbrand --- Documentation/mm/page_migration.rst | 39 - 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/Documentation/mm/page_migration.rst b/Documentation/mm/page_migration.rst index 519b35a4c

[PATCH RFC 24/29] mm/page-flags: remove folio_mapping_flags()

2025-06-18 Thread David Hildenbrand
It's unused and the page counterpart is gone, so let's remove it. Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 5 - 1 file changed, 5 deletions(-) diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f539bd5e14200..b42986a578b71 100644 --- a/includ

[PATCH RFC 22/29] mm/page-flags: rename PAGE_MAPPING_MOVABLE to PAGE_MAPPING_ANON_KSM

2025-06-18 Thread David Hildenbrand
KSM is the only remaining user, let's rename the flag. While at it, adjust to remaining page -> folio in the doc. Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/page-flags.h b/include/

[PATCH RFC 23/29] mm/page-alloc: remove PageMappingFlags()

2025-06-18 Thread David Hildenbrand
We can now simply check for PageAnon() and remove PageMappingFlags(). ... and while at it, use the folio instead and operate on folio->mapping. Signed-off-by: David Hildenbrand --- include/linux/page-flags.h | 5 - mm/page_alloc.c| 7 +++ 2 files changed, 3 insertions(+), 9

[PATCH RFC 20/29] mm: convert "movable" flag in page->mapping to a page flag

2025-06-18 Thread David Hildenbrand
Instead, let's use a page flag. As the page flag can result in false-positives, glue it to the page types for which we support/implement movable_ops page migration. Signed-off-by: David Hildenbrand --- include/linux/balloon_compaction.h | 2 +- include/linux/migrate.h| 8 - inc

[PATCH RFC 19/29] mm: stop storing migration_ops in page->mapping

2025-06-18 Thread David Hildenbrand
... instead, look them up statically based on the page type. Maybe in the future we want a registration interface? At least for now, it can be easily handled using the two page types that actually support page migration. The remaining usage of page->mapping is to flag such pages as actually being

[PATCH RFC 18/29] mm: remove __folio_test_movable()

2025-06-18 Thread David Hildenbrand
Convert to page_has_movable_ops(). While at it, cleanup relevant code a bit. The data_race() in migrate_folio_unmap() is questionable: we already hold a page reference, and concurrent modifications can no longer happen (iow: __ClearPageMovable() no longer exists). Drop it for now, we'll rework pag

[PATCH RFC 16/29] mm: rename __PageMovable() to page_has_movable_ops()

2025-06-18 Thread David Hildenbrand
Let's make it clearer that we are talking about movable_ops pages. Signed-off-by: David Hildenbrand --- include/linux/migrate.h| 2 +- include/linux/page-flags.h | 2 +- mm/compaction.c| 7 ++- mm/memory-failure.c| 4 ++-- mm/memory_hotplug.c| 8 +++-

[PATCH RFC 17/29] mm/page_isolation: drop __folio_test_movable() check for large folios

2025-06-18 Thread David Hildenbrand
Currently, we only support migration of individual non-folio pages, so we can not run into that. Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index b97b965b3ed01..f72b6cd38b9

[PATCH RFC 15/29] mm/migration: remove PageMovable()

2025-06-18 Thread David Hildenbrand
As __ClearPageMovable() is gone that would have only made PageMovable()==false but still __PageMovable()==true, now PageMovable() == __PageMovable(). So we can replace PageMovable() checks by __PageMovable(). In fact, __PageMovable() cannot change until a page is freed, so we can turn some PageMov

[PATCH RFC 14/29] mm/migrate: remove __ClearPageMovable()

2025-06-18 Thread David Hildenbrand
Unused, let's remove it. The Chinese docs in Documentation/translations/zh_CN/mm/page_migration.rst still mention it, but that whole docs is destined to get outdated and updated by somebody that actually speaks that language. Signed-off-by: David Hildenbrand --- include/linux/migrate.h | 4 ---

[PATCH RFC 12/29] mm/zsmalloc: stop using __ClearPageMovable()

2025-06-18 Thread David Hildenbrand
Instead, let's check in the callbacks if the page was already destroyed, which can be checked by looking at zpdesc->zspage (see reset_zpdesc()). If we detect that the page was destroyed: (1) Fail isolation, just like the migration core would (2) Fake migration success just like the migration cor

[PATCH RFC 13/29] mm/balloon_compaction: stop using __ClearPageMovable()

2025-06-18 Thread David Hildenbrand
We can just look at the balloon device (stored in page->private), to see of the page is still part of the balloon. As isolated balloon pages cannot get released (they are taken off the balloon list while isolated), we don't have to worry about this case in the putback and migration callback. Add a

[PATCH RFC 11/29] mm/migrate: move movable_ops page handling out of move_to_new_folio()

2025-06-18 Thread David Hildenbrand
Let's move that handling directly into migrate_folio_move(), so we can simplify move_to_new_folio(). While at it, fixup the documentation a bit. Note that unmap_and_move_huge_page() does not care, because it only deals with actual folios. (we only support migration of individual movable_ops pages)

[PATCH RFC 10/29] mm/migrate: remove folio_test_movable() and folio_movable_ops()

2025-06-18 Thread David Hildenbrand
Folios will have nothing to do with movable_ops page migration. These functions are now unused, so let's remove them. Signed-off-by: David Hildenbrand --- include/linux/migrate.h | 14 -- 1 file changed, 14 deletions(-) diff --git a/include/linux/migrate.h b/include/linux/migrate.h

[PATCH RFC 08/29] mm/migrate: rename putback_movable_folio() to putback_movable_ops_page()

2025-06-18 Thread David Hildenbrand
... and factor the complete handling of movable_ops pages out. Convert it similar to isolate_movable_ops_page(). While at it, convert the VM_BUG_ON_FOLIO() into a VM_WARN_ON_PAGE(). Signed-off-by: David Hildenbrand --- mm/migrate.c | 37 - 1 file changed, 24

[PATCH RFC 09/29] mm/migrate: factor out movable_ops page handling into migrate_movable_ops_page()

2025-06-18 Thread David Hildenbrand
Let's factor it out, simplifying the calling code. The assumption is that flush_dcache_page() is not required for movable_ops pages: as documented for flush_dcache_folio(), it really only applies when the kernel wrote to pagecache pages / pages in highmem. movable_ops callbacks should be handling

[PATCH RFC 06/29] mm/zsmalloc: make PageZsmalloc() sticky

2025-06-18 Thread David Hildenbrand
Let the buddy handle clearing the type. Signed-off-by: David Hildenbrand --- mm/zpdesc.h | 5 - mm/zsmalloc.c | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/mm/zpdesc.h b/mm/zpdesc.h index 5cb7e3de43952..5763f36039736 100644 --- a/mm/zpdesc.h +++ b/mm/zpdesc.h @@ -1

[PATCH RFC 07/29] mm/migrate: rename isolate_movable_page() to isolate_movable_ops_page()

2025-06-18 Thread David Hildenbrand
... and start moving back to per-page things that will absolutely not be folio things in the future. Add documentation and a comment that the remaining folio stuff (lock, refcount) will have to be reworked as well. While at it, convert the VM_BUG_ON() into a WARN_ON_ONCE() and handle it gracefully

[PATCH RFC 05/29] mm/balloon_compaction: make PageOffline sticky

2025-06-18 Thread David Hildenbrand
Let the buddy handle clearing the type. Signed-off-by: David Hildenbrand --- include/linux/balloon_compaction.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/balloon_compaction.h b/include/linux/balloon_compaction.h index b9f19da37b089..bfc6e50bd004b 100644 -

[PATCH RFC 04/29] mm/page_alloc: allow for making page types sticky until freed

2025-06-18 Thread David Hildenbrand
Let's allow for not clearing a page type before freeing a page to the buddy. We'll focus on having a type set on the first page of a larger allocation only. With this change, we can reliably identify typed folios even though they might be in the process of getting freed, which will come in handy

[PATCH RFC 01/29] mm/balloon_compaction: we cannot have isolated pages in the balloon list

2025-06-18 Thread David Hildenbrand
The core will set PG_isolated only after mops->isolate_page() was called. In case of the balloon, that is where we will remove it from the balloon list. So we cannot have isolated pages in the balloon list. Let's drop this unnecessary check. Signed-off-by: David Hildenbrand --- mm/balloon_compa

[PATCH RFC 03/29] mm/zsmalloc: drop PageIsolated() related VM_BUG_ONs

2025-06-18 Thread David Hildenbrand
Let's drop these checks; these are conditions the core migration code must make sure will hold either way, no need to double check. Signed-off-by: David Hildenbrand --- mm/zpdesc.h | 5 - mm/zsmalloc.c | 5 - 2 files changed, 10 deletions(-) diff --git a/mm/zpdesc.h b/mm/zpdesc.h inde

[PATCH RFC 02/29] mm/balloon_compaction: convert balloon_page_delete() to balloon_page_finalize()

2025-06-18 Thread David Hildenbrand
Let's move the removal of the page from the balloon list into the single caller, to remove the dependency on the PG_isolated flag and clarify locking requirements. We'll shuffle the operations a bit such that they logically make more sense (e.g., remove from the list before clearing flags). In ba

[PATCH RFC 00/29] mm/migration: rework movable_ops page migration (part 1)

2025-06-18 Thread David Hildenbrand
Based on mm/mm-new. In the future, as we decouple "struct page" from "struct folio", pages that support "non-lru page migration" -- movable_ops page migration such as memory balloons and zsmalloc -- will no longer be folios. They will not have ->mapping, ->lru, and likely no refcount and no page l

Re: [PATCH 2/6] mm: Lock kernel page tables before entering lazy MMU mode

2025-06-18 Thread Dan Carpenter
Hi Alexander, kernel test robot noticed the following build warnings: url: https://github.com/intel-lab-lkp/linux/commits/Alexander-Gordeev/mm-Cleanup-apply_to_pte_range-routine/20250613-013835 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link:

[PATCH v2 6/6] pci/hotplug/pnv_php: Enable third attention indicator

2025-06-18 Thread Timothy Pearson
state The PCIe specification allows three attention indicator states, on, off, and blink. Enable all three states instead of basic on / off control. Signed-off-by: Timothy Pearson --- drivers/pci/hotplug/pnv_php.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --g

[PATCH v2 5/6] pci/hotplug/pnv_php: Fix surprise plug detection and

2025-06-18 Thread Timothy Pearson
recovery The existing PowerNV hotplug code did not handle suprise plug events correctly, leading to a complete failure of the hotplug system after device removal and a required reboot to detect new devices. This comes down to two issues: 1.) When a device is suprise removed, oftentimes the bridg

[PATCH v2 4/6] powerpc/eeh: Make EEH driver device hotplug safe

2025-06-18 Thread Timothy Pearson
Multiple race conditions existed between the PCIe hotplug driver and the EEH driver, leading to a variety of kernel oopses of the same general nature: A second class of oops is also seen when the underling bus disappears during device recovery. Refactor the EEH module to be PCI rescan and

[PATCH v2 3/6] powerpc/eeh: Export eeh_unfreeze_pe()

2025-06-18 Thread Timothy Pearson
The PowerNV hotplug driver needs to be able to clear any frozen PE(s) on the PHB after suprise removal of a downstream device. Export the eeh_unfreeze_pe() symbol to allow implementation of this functionality in the php_nv module. Signed-off-by: Timothy Pearson --- arch/powerpc/kernel/eeh.c | 1

[PATCH v2 2/6] pci/hotplug/pnv_php: Work around switches with broken

2025-06-18 Thread Timothy Pearson
presence detection The Microsemi Switchtec PM8533 PFX 48xG3 [11f8:8533] PCIe switch system was observed to incorrectly assert the Presence Detect Set bit in its capabilities when tested on a Raptor Computing Systems Blackbird system, resulting in the hot insert path never attempting a rescan of t

[PATCH v2 1/6] pci/hotplug/pnv_php: Properly clean up allocated IRQs on

2025-06-18 Thread Timothy Pearson
unplug In cases where the root of a nested PCIe bridge configuration is unplugged, the pnv_php driver would leak the allocated IRQ resources for the child bridges' hotplug event notifications, resulting in a panic. Fix this by walking all child buses and deallocating all it's IRQ resources before

Re: [PATCH 3/8] powerpc/pseries/eeh: Export eeh_unfreeze_pe() and eeh_ops

2025-06-18 Thread Timothy Pearson
- Original Message - > From: "Timothy Pearson" > To: "Christoph Hellwig" > Cc: "linuxppc-dev" , "linux-kernel" > , "linux-pci" > , "Madhavan Srinivasan" , > "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" > , "Bjorn Helgaas" > , "Shawn Anastasio" > Sent: Wednesday, June

[PATCH v2 0/6] PowerNV PCIe Hotplug Driver Fixes

2025-06-18 Thread Timothy Pearson
Hello all, This series includes several fixes for bugs in the PowerNV PCIe hotplug driver that were discovered in testing with a Microsemi Switchtec PM8533 PFX 48xG3 PCIe switch on a PowerNV system, as well as one workaround for PCIe switches that don't correctly implement slot presence detection

Re: [PATCH 3/8] powerpc/pseries/eeh: Export eeh_unfreeze_pe() and eeh_ops

2025-06-18 Thread Timothy Pearson
- Original Message - > From: "Christoph Hellwig" > To: "Timothy Pearson" > Cc: "linuxppc-dev" , "linux-kernel" > , "linux-pci" > , "Madhavan Srinivasan" , > "Michael Ellerman" , > "christophe leroy" , "Naveen N Rao" > , "Bjorn Helgaas" > , "Shawn Anastasio" > Sent: Wednesday, June

Re: [PATCH] Documentation: embargoed-hardware-issues.rst: Add myself for Power

2025-06-18 Thread Greg KH
On Sat, Jun 14, 2025 at 08:59:24PM +0530, Madhavan Srinivasan wrote: > Adding myself as the contact for Power > > Signed-off-by: Madhavan Srinivasan > --- > Documentation/process/embargoed-hardware-issues.rst | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/process/embargo

Re: [PATCH v2 03/14] mm: Convert vmf_insert_mixed() from using pte_devmap to pte_special

2025-06-18 Thread David Hildenbrand
On 17.06.25 11:49, David Hildenbrand wrote: On 16.06.25 13:58, Alistair Popple wrote: DAX no longer requires device PTEs as it always has a ZONE_DEVICE page associated with the PTE that can be reference counted normally. Other users of pte_devmap are drivers that set PFN_DEV when calling vmf_ins