mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* linux-next: manual merge of the drm-xe tree with the mm tree
@ 2025-03-07  1:29 Stephen Rothwell
  2025-03-11  2:12 ` Stephen Rothwell
  2025-03-30 23:26 ` Stephen Rothwell
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2025-03-07  1:29 UTC (permalink / raw)
  To: Lucas De Marchi, Thomas Hellström, Andrew Morton
  Cc: DRM XE List, Alistair Popple, Balbir Singh,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost

[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]

Hi all,

Today's linux-next merge of the drm-xe tree got a conflict in:

  mm/memory.c

between commit:

  089b22f60a0f ("mm: allow compound zone device pages")

from the mm-unstable branch of the mm tree and commit:

  1afaeb8293c9 ("mm/migrate: Trylock device page in do_swap_page")

from the drm-xe tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc mm/memory.c
index d21f6cded7e3,59b804f4bf3f..000000000000
--- a/mm/memory.c
+++ b/mm/memory.c
@@@ -4473,11 -4348,15 +4473,16 @@@ vm_fault_t do_swap_page(struct vm_faul
  			 * Get a page reference while we know the page can't be
  			 * freed.
  			 */
- 			get_page(vmf->page);
- 			pte_unmap_unlock(vmf->pte, vmf->ptl);
- 			pgmap = page_pgmap(vmf->page);
- 			ret = pgmap->ops->migrate_to_ram(vmf);
- 			put_page(vmf->page);
+ 			if (trylock_page(vmf->page)) {
+ 				get_page(vmf->page);
+ 				pte_unmap_unlock(vmf->pte, vmf->ptl);
 -				ret = vmf->page->pgmap->ops->migrate_to_ram(vmf);
++				pgmap = page_pgmap(vmf->page);
++				ret = pgmap->ops->migrate_to_ram(vmf);
+ 				unlock_page(vmf->page);
+ 				put_page(vmf->page);
+ 			} else {
+ 				pte_unmap_unlock(vmf->pte, vmf->ptl);
+ 			}
  		} else if (is_hwpoison_entry(entry)) {
  			ret = VM_FAULT_HWPOISON;
  		} else if (is_pte_marker_entry(entry)) {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the drm-xe tree with the mm tree
  2025-03-07  1:29 linux-next: manual merge of the drm-xe tree with the mm tree Stephen Rothwell
@ 2025-03-11  2:12 ` Stephen Rothwell
  2025-03-11  5:57   ` Alistair Popple
  2025-03-30 23:26 ` Stephen Rothwell
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2025-03-11  2:12 UTC (permalink / raw)
  To: Andrew Morton, Dave Airlie
  Cc: Lucas De Marchi, Thomas Hellström, DRM XE List,
	Alistair Popple, Balbir Singh, Linux Kernel Mailing List,
	Linux Next Mailing List, Matthew Brost, DRI

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]

Hi all,

On Fri, 7 Mar 2025 12:29:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
> 
> Today's linux-next merge of the drm-xe tree got a conflict in:
> 
>   mm/memory.c
> 
> between commit:
> 
>   089b22f60a0f ("mm: allow compound zone device pages")
> 
> from the mm-unstable branch of the mm tree and commit:
> 
>   1afaeb8293c9 ("mm/migrate: Trylock device page in do_swap_page")
> 
> from the drm-xe tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc mm/memory.c
> index d21f6cded7e3,59b804f4bf3f..000000000000
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@@ -4473,11 -4348,15 +4473,16 @@@ vm_fault_t do_swap_page(struct vm_faul
>   			 * Get a page reference while we know the page can't be
>   			 * freed.
>   			 */
> - 			get_page(vmf->page);
> - 			pte_unmap_unlock(vmf->pte, vmf->ptl);
> - 			pgmap = page_pgmap(vmf->page);
> - 			ret = pgmap->ops->migrate_to_ram(vmf);
> - 			put_page(vmf->page);
> + 			if (trylock_page(vmf->page)) {
> + 				get_page(vmf->page);
> + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
>  -				ret = vmf->page->pgmap->ops->migrate_to_ram(vmf);
> ++				pgmap = page_pgmap(vmf->page);
> ++				ret = pgmap->ops->migrate_to_ram(vmf);
> + 				unlock_page(vmf->page);
> + 				put_page(vmf->page);
> + 			} else {
> + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
> + 			}
>   		} else if (is_hwpoison_entry(entry)) {
>   			ret = VM_FAULT_HWPOISON;
>   		} else if (is_pte_marker_entry(entry)) {

This is now conflict between the mm tree and the drm tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the drm-xe tree with the mm tree
  2025-03-11  2:12 ` Stephen Rothwell
@ 2025-03-11  5:57   ` Alistair Popple
  2025-03-11  7:02     ` Stephen Rothwell
  0 siblings, 1 reply; 5+ messages in thread
From: Alistair Popple @ 2025-03-11  5:57 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Andrew Morton, Dave Airlie, Lucas De Marchi,
	Thomas Hellström, DRM XE List, Balbir Singh,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost, DRI

On Tue, Mar 11, 2025 at 01:12:14PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Fri, 7 Mar 2025 12:29:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > Hi all,
> > 
> > Today's linux-next merge of the drm-xe tree got a conflict in:
> > 
> >   mm/memory.c
> > 
> > between commit:
> > 
> >   089b22f60a0f ("mm: allow compound zone device pages")
> > 
> > from the mm-unstable branch of the mm tree and commit:
> > 
> >   1afaeb8293c9 ("mm/migrate: Trylock device page in do_swap_page")
> > 
> > from the drm-xe tree.

I'm not sure what the process is here, but having either reviewed or authored
these patches I can add that the fix up carried below looks correct.

 - Alistair

> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> > 
> > diff --cc mm/memory.c
> > index d21f6cded7e3,59b804f4bf3f..000000000000
> > --- a/mm/memory.c
> > +++ b/mm/memory.c
> > @@@ -4473,11 -4348,15 +4473,16 @@@ vm_fault_t do_swap_page(struct vm_faul
> >   			 * Get a page reference while we know the page can't be
> >   			 * freed.
> >   			 */
> > - 			get_page(vmf->page);
> > - 			pte_unmap_unlock(vmf->pte, vmf->ptl);
> > - 			pgmap = page_pgmap(vmf->page);
> > - 			ret = pgmap->ops->migrate_to_ram(vmf);
> > - 			put_page(vmf->page);
> > + 			if (trylock_page(vmf->page)) {
> > + 				get_page(vmf->page);
> > + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
> >  -				ret = vmf->page->pgmap->ops->migrate_to_ram(vmf);
> > ++				pgmap = page_pgmap(vmf->page);
> > ++				ret = pgmap->ops->migrate_to_ram(vmf);
> > + 				unlock_page(vmf->page);
> > + 				put_page(vmf->page);
> > + 			} else {
> > + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
> > + 			}
> >   		} else if (is_hwpoison_entry(entry)) {
> >   			ret = VM_FAULT_HWPOISON;
> >   		} else if (is_pte_marker_entry(entry)) {
> 
> This is now conflict between the mm tree and the drm tree.
>
> -- 
> Cheers,
> Stephen Rothwell



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the drm-xe tree with the mm tree
  2025-03-11  5:57   ` Alistair Popple
@ 2025-03-11  7:02     ` Stephen Rothwell
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2025-03-11  7:02 UTC (permalink / raw)
  To: Alistair Popple
  Cc: Andrew Morton, Dave Airlie, Lucas De Marchi,
	Thomas Hellström, DRM XE List, Balbir Singh,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost, DRI

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

Hi Alistair,

On Tue, 11 Mar 2025 16:57:49 +1100 Alistair Popple <apopple@nvidia.com> wrote:
>
> I'm not sure what the process is here, but having either reviewed or authored
> these patches I can add that the fix up carried below looks correct.

Thanks.  This means that people can have a bit more confidence in the
resulting linux-next tree (and so can I :-)) and when the merge
requests are sent to Linus, they can just reference my resolution.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linux-next: manual merge of the drm-xe tree with the mm tree
  2025-03-07  1:29 linux-next: manual merge of the drm-xe tree with the mm tree Stephen Rothwell
  2025-03-11  2:12 ` Stephen Rothwell
@ 2025-03-30 23:26 ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2025-03-30 23:26 UTC (permalink / raw)
  To: Lucas De Marchi, Thomas Hellström, Andrew Morton
  Cc: DRM XE List, Alistair Popple, Balbir Singh,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Matthew Brost

[-- Attachment #1: Type: text/plain, Size: 1942 bytes --]

Hi all,

On Fri, 7 Mar 2025 12:29:54 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> Today's linux-next merge of the drm-xe tree got a conflict in:
> 
>   mm/memory.c
> 
> between commit:
> 
>   089b22f60a0f ("mm: allow compound zone device pages")
> 
> from the mm-unstable branch of the mm tree and commit:
> 
>   1afaeb8293c9 ("mm/migrate: Trylock device page in do_swap_page")
> 
> from the drm-xe tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> 
> diff --cc mm/memory.c
> index d21f6cded7e3,59b804f4bf3f..000000000000
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@@ -4473,11 -4348,15 +4473,16 @@@ vm_fault_t do_swap_page(struct vm_faul
>   			 * Get a page reference while we know the page can't be
>   			 * freed.
>   			 */
> - 			get_page(vmf->page);
> - 			pte_unmap_unlock(vmf->pte, vmf->ptl);
> - 			pgmap = page_pgmap(vmf->page);
> - 			ret = pgmap->ops->migrate_to_ram(vmf);
> - 			put_page(vmf->page);
> + 			if (trylock_page(vmf->page)) {
> + 				get_page(vmf->page);
> + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
>  -				ret = vmf->page->pgmap->ops->migrate_to_ram(vmf);
> ++				pgmap = page_pgmap(vmf->page);
> ++				ret = pgmap->ops->migrate_to_ram(vmf);
> + 				unlock_page(vmf->page);
> + 				put_page(vmf->page);
> + 			} else {
> + 				pte_unmap_unlock(vmf->pte, vmf->ptl);
> + 			}
>   		} else if (is_hwpoison_entry(entry)) {
>   			ret = VM_FAULT_HWPOISON;
>   		} else if (is_pte_marker_entry(entry)) {

This is now a conflict between the mm-stable tree and Linus' tree.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-30 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-07  1:29 linux-next: manual merge of the drm-xe tree with the mm tree Stephen Rothwell
2025-03-11  2:12 ` Stephen Rothwell
2025-03-11  5:57   ` Alistair Popple
2025-03-11  7:02     ` Stephen Rothwell
2025-03-30 23:26 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®