linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kvm tree with the vfs-brauner tree
@ 2023-11-22  1:55 Stephen Rothwell
  2023-11-22  7:10 ` Christoph Hellwig
  2023-12-04  0:51 ` Stephen Rothwell
  0 siblings, 2 replies; 5+ messages in thread
From: Stephen Rothwell @ 2023-11-22  1:55 UTC (permalink / raw)
  To: Paolo Bonzini, KVM, Christian Brauner
  Cc: Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List, Sean Christopherson, Vlastimil Babka

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

Hi all,

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

  include/linux/pagemap.h

between commit:

  762321dab9a7 ("filemap: add a per-mapping stable writes flag")

from the vfs-brauner tree and commit:

  0003e2a41468 ("mm: Add AS_UNMOVABLE to mark mapping as completely unmovable")

from the kvm 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 include/linux/pagemap.h
index 06142ff7f9ce,bf2965b01b35..000000000000
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@@ -203,9 -203,8 +203,10 @@@ enum mapping_flags 
  	/* writeback related tags are not used */
  	AS_NO_WRITEBACK_TAGS = 5,
  	AS_LARGE_FOLIO_SUPPORT = 6,
- 	AS_RELEASE_ALWAYS,	/* Call ->release_folio(), even if no private data */
+ 	AS_RELEASE_ALWAYS = 7,	/* Call ->release_folio(), even if no private data */
+ 	AS_UNMOVABLE	= 8,	/* The mapping cannot be moved, ever */
 +	AS_STABLE_WRITES,	/* must wait for writeback before modifying
 +				   folio contents */
  };
  
  /**
@@@ -291,21 -290,22 +292,37 @@@ static inline void mapping_clear_releas
  	clear_bit(AS_RELEASE_ALWAYS, &mapping->flags);
  }
  
+ static inline void mapping_set_unmovable(struct address_space *mapping)
+ {
+ 	/*
+ 	 * It's expected unmovable mappings are also unevictable. Compaction
+ 	 * migrate scanner (isolate_migratepages_block()) relies on this to
+ 	 * reduce page locking.
+ 	 */
+ 	set_bit(AS_UNEVICTABLE, &mapping->flags);
+ 	set_bit(AS_UNMOVABLE, &mapping->flags);
+ }
+ 
+ static inline bool mapping_unmovable(struct address_space *mapping)
+ {
+ 	return test_bit(AS_UNMOVABLE, &mapping->flags);
+ }
+ 
 +static inline bool mapping_stable_writes(const struct address_space *mapping)
 +{
 +	return test_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
 +static inline void mapping_set_stable_writes(struct address_space *mapping)
 +{
 +	set_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
 +static inline void mapping_clear_stable_writes(struct address_space *mapping)
 +{
 +	clear_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
  static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
  {
  	return mapping->gfp_mask;

[-- 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 kvm tree with the vfs-brauner tree
  2023-11-22  1:55 linux-next: manual merge of the kvm tree with the vfs-brauner tree Stephen Rothwell
@ 2023-11-22  7:10 ` Christoph Hellwig
  2023-11-22 10:20   ` Christian Brauner
  2023-11-22 21:11   ` Stephen Rothwell
  2023-12-04  0:51 ` Stephen Rothwell
  1 sibling, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2023-11-22  7:10 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Paolo Bonzini, KVM, Christian Brauner, Christoph Hellwig,
	Linux Kernel Mailing List, Linux Next Mailing List,
	Sean Christopherson, Vlastimil Babka

On Wed, Nov 22, 2023 at 12:55:39PM +1100, Stephen Rothwell wrote:
> index 06142ff7f9ce,bf2965b01b35..000000000000
> --- a/include/linux/pagemap.h
> +++ b/include/linux/pagemap.h
> @@@ -203,9 -203,8 +203,10 @@@ enum mapping_flags 
>   	/* writeback related tags are not used */
>   	AS_NO_WRITEBACK_TAGS = 5,
>   	AS_LARGE_FOLIO_SUPPORT = 6,
> - 	AS_RELEASE_ALWAYS,	/* Call ->release_folio(), even if no private data */
> + 	AS_RELEASE_ALWAYS = 7,	/* Call ->release_folio(), even if no private data */
> + 	AS_UNMOVABLE	= 8,	/* The mapping cannot be moved, ever */
>  +	AS_STABLE_WRITES,	/* must wait for writeback before modifying
>  +				   folio contents */
>   };

Note that AS_STABLE_WRITES, is a fix for 6.7, so this will probably
end up getting reordered.  It might also be worth to remove all the
explicit number assignments here to make the merge conflict resolution
a bit easier in the future.

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

* Re: linux-next: manual merge of the kvm tree with the vfs-brauner tree
  2023-11-22  7:10 ` Christoph Hellwig
@ 2023-11-22 10:20   ` Christian Brauner
  2023-11-22 21:11   ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Christian Brauner @ 2023-11-22 10:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Stephen Rothwell, Paolo Bonzini, KVM, Linux Kernel Mailing List,
	Linux Next Mailing List, Sean Christopherson, Vlastimil Babka

On Wed, Nov 22, 2023 at 08:10:40AM +0100, Christoph Hellwig wrote:
> On Wed, Nov 22, 2023 at 12:55:39PM +1100, Stephen Rothwell wrote:
> > index 06142ff7f9ce,bf2965b01b35..000000000000
> > --- a/include/linux/pagemap.h
> > +++ b/include/linux/pagemap.h
> > @@@ -203,9 -203,8 +203,10 @@@ enum mapping_flags 
> >   	/* writeback related tags are not used */
> >   	AS_NO_WRITEBACK_TAGS = 5,
> >   	AS_LARGE_FOLIO_SUPPORT = 6,
> > - 	AS_RELEASE_ALWAYS,	/* Call ->release_folio(), even if no private data */
> > + 	AS_RELEASE_ALWAYS = 7,	/* Call ->release_folio(), even if no private data */
> > + 	AS_UNMOVABLE	= 8,	/* The mapping cannot be moved, ever */
> >  +	AS_STABLE_WRITES,	/* must wait for writeback before modifying
> >  +				   folio contents */
> >   };
> 
> Note that AS_STABLE_WRITES, is a fix for 6.7, so this will probably

Yes, I plan on sending a fixes pr on Friday. I've wanted this in -next
for a few days.

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

* Re: linux-next: manual merge of the kvm tree with the vfs-brauner tree
  2023-11-22  7:10 ` Christoph Hellwig
  2023-11-22 10:20   ` Christian Brauner
@ 2023-11-22 21:11   ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2023-11-22 21:11 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Paolo Bonzini, KVM, Christian Brauner, Linux Kernel Mailing List,
	Linux Next Mailing List, Sean Christopherson, Vlastimil Babka

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

Hi Christoph,

On Wed, 22 Nov 2023 08:10:40 +0100 Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, Nov 22, 2023 at 12:55:39PM +1100, Stephen Rothwell wrote:
> > index 06142ff7f9ce,bf2965b01b35..000000000000
> > --- a/include/linux/pagemap.h
> > +++ b/include/linux/pagemap.h
> > @@@ -203,9 -203,8 +203,10 @@@ enum mapping_flags 
> >   	/* writeback related tags are not used */
> >   	AS_NO_WRITEBACK_TAGS = 5,
> >   	AS_LARGE_FOLIO_SUPPORT = 6,
> > - 	AS_RELEASE_ALWAYS,	/* Call ->release_folio(), even if no private data */
> > + 	AS_RELEASE_ALWAYS = 7,	/* Call ->release_folio(), even if no private data */
> > + 	AS_UNMOVABLE	= 8,	/* The mapping cannot be moved, ever */
> >  +	AS_STABLE_WRITES,	/* must wait for writeback before modifying
> >  +				   folio contents */
> >   };  
> 
> Note that AS_STABLE_WRITES, is a fix for 6.7, so this will probably
> end up getting reordered.  It might also be worth to remove all the
> explicit number assignments here to make the merge conflict resolution
> a bit easier in the future.

Thanks, I will reorder them from today (and drop the numbering on the
added ones).

-- 
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 kvm tree with the vfs-brauner tree
  2023-11-22  1:55 linux-next: manual merge of the kvm tree with the vfs-brauner tree Stephen Rothwell
  2023-11-22  7:10 ` Christoph Hellwig
@ 2023-12-04  0:51 ` Stephen Rothwell
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2023-12-04  0:51 UTC (permalink / raw)
  To: Paolo Bonzini, KVM
  Cc: Christian Brauner, Christoph Hellwig, Linux Kernel Mailing List,
	Linux Next Mailing List, Sean Christopherson, Vlastimil Babka

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

Hi all,

On Wed, 22 Nov 2023 12:55:39 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the kvm tree got a conflict in:
> 
>   include/linux/pagemap.h
> 
> between commit:
> 
>   762321dab9a7 ("filemap: add a per-mapping stable writes flag")

This is now in Linus' tree.

> from the vfs-brauner tree and commit:
> 
>   0003e2a41468 ("mm: Add AS_UNMOVABLE to mark mapping as completely unmovable")
> 
> from the kvm 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.

The current resolution is below.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/pagemap.h
index 06142ff7f9ce,bf2965b01b35..c2d90588c0bf
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@@ -203,9 -203,8 +203,10 @@@ enum mapping_flags 
  	/* writeback related tags are not used */
  	AS_NO_WRITEBACK_TAGS = 5,
  	AS_LARGE_FOLIO_SUPPORT = 6,
 -	AS_RELEASE_ALWAYS = 7,	/* Call ->release_folio(), even if no private data */
 -	AS_UNMOVABLE	= 8,	/* The mapping cannot be moved, ever */
 +	AS_RELEASE_ALWAYS,	/* Call ->release_folio(), even if no private data */
 +	AS_STABLE_WRITES,	/* must wait for writeback before modifying
 +				   folio contents */
++	AS_UNMOVABLE,		/* The mapping cannot be moved, ever */
  };
  
  /**
@@@ -291,21 -290,22 +292,37 @@@ static inline void mapping_clear_releas
  	clear_bit(AS_RELEASE_ALWAYS, &mapping->flags);
  }
  
+ static inline void mapping_set_unmovable(struct address_space *mapping)
+ {
+ 	/*
+ 	 * It's expected unmovable mappings are also unevictable. Compaction
+ 	 * migrate scanner (isolate_migratepages_block()) relies on this to
+ 	 * reduce page locking.
+ 	 */
+ 	set_bit(AS_UNEVICTABLE, &mapping->flags);
+ 	set_bit(AS_UNMOVABLE, &mapping->flags);
+ }
+ 
+ static inline bool mapping_unmovable(struct address_space *mapping)
+ {
+ 	return test_bit(AS_UNMOVABLE, &mapping->flags);
+ }
+ 
 +static inline bool mapping_stable_writes(const struct address_space *mapping)
 +{
 +	return test_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
 +static inline void mapping_set_stable_writes(struct address_space *mapping)
 +{
 +	set_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
 +static inline void mapping_clear_stable_writes(struct address_space *mapping)
 +{
 +	clear_bit(AS_STABLE_WRITES, &mapping->flags);
 +}
 +
  static inline gfp_t mapping_gfp_mask(struct address_space * mapping)
  {
  	return mapping->gfp_mask;

[-- 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:[~2023-12-04  0:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-22  1:55 linux-next: manual merge of the kvm tree with the vfs-brauner tree Stephen Rothwell
2023-11-22  7:10 ` Christoph Hellwig
2023-11-22 10:20   ` Christian Brauner
2023-11-22 21:11   ` Stephen Rothwell
2023-12-04  0:51 ` Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).