Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Stephen Rothwell
Hi Jakub,

On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski  wrote:
>
> AFAIU all we can do is tell Linus about the merge issue, and point 
> at Stephen's resolution.

This is the correct response.

-- 
Cheers,
Stephen Rothwell


pgphDBS_HwAUg.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Jakub Kicinski
On Mon, 14 Dec 2020 18:11:21 -0800 Andrew Morton wrote:
> On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski  wrote:
> > Hm. The code is in net-next by now. I was thinking of sending the
> > Networking PR later today (tonight?) as well. I'm happy to hold off 
> > or do whatever you require, but I'd appreciate more explicit / noob
> > friendly instructions.  
> 
> Linus tends not to like it when tree maintainers do last-minute
> conflict fixes.

Good to know.

> > AFAIU all we can do is tell Linus about the merge issue, and point 
> > at Stephen's resolution.  
> 
> That's the way to do it - including a (tested?) copy in the email would
> be nice.

Okay, great. Will try this, thanks!


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Andrew Morton
On Mon, 14 Dec 2020 18:06:29 -0800 Jakub Kicinski  wrote:

> On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote:
> > On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin  wrote:
> > > On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote:  
> > > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell 
> > > >  wrote:  
> > > > > Today's linux-next merge of the akpm-current tree got conflicts in:
> > > > > 
> > > > >   include/linux/memcontrol.h
> > > > >   mm/memcontrol.c
> > > > > 
> > > > > between commit:
> > > > > 
> > > > >   bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg 
> > > > > data")
> > > > > 
> > > > > from the bpf-next tree and commits:
> > > > > 
> > > > >   6771a349b8c3 ("mm/memcg: remove incorrect comment")
> > > > >   c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")
> > > > > 
> > > > > from the akpm-current tree.
> > > > >   
> > > ...  
> > > > 
> > > > Just a reminder that this conflict still exists.  Commit bcfe06bf2622
> > > > is now in the net-next tree.  
> > > 
> > > Thanks, Stephen!
> > > 
> > > I wonder if it's better to update these 2 commits in the mm tree to avoid
> > > conflicts?
> > > 
> > > Basically split your fix into two and merge it into mm commits.
> > > The last chunk in the patch should be merged into "mm/memcg: remove 
> > > incorrect comment".
> > > And the rest into "mm: move lruvec stats update functions to vmstat.h".
> > > 
> > > Andrew, what do you think?  
> > 
> > I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats
> > update functions to vmstat.h" staged against Linus's tree and plan to
> > send them to him later today.  So I trust the BPF tree maintainers will
> > be able to resolve these minor things when those patches turn up in
> > mainline.
> 
> Hm. The code is in net-next by now. I was thinking of sending the
> Networking PR later today (tonight?) as well. I'm happy to hold off 
> or do whatever you require, but I'd appreciate more explicit / noob
> friendly instructions.

Linus tends not to like it when tree maintainers do last-minute
conflict fixes.

> AFAIU all we can do is tell Linus about the merge issue, and point 
> at Stephen's resolution.

That's the way to do it - including a (tested?) copy in the email would
be nice.



Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Jakub Kicinski
On Mon, 14 Dec 2020 17:40:21 -0800 Andrew Morton wrote:
> On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin  wrote:
> > On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote:  
> > > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell 
> > >  wrote:  
> > > > Today's linux-next merge of the akpm-current tree got conflicts in:
> > > > 
> > > >   include/linux/memcontrol.h
> > > >   mm/memcontrol.c
> > > > 
> > > > between commit:
> > > > 
> > > >   bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data")
> > > > 
> > > > from the bpf-next tree and commits:
> > > > 
> > > >   6771a349b8c3 ("mm/memcg: remove incorrect comment")
> > > >   c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")
> > > > 
> > > > from the akpm-current tree.
> > > >   
> > ...  
> > > 
> > > Just a reminder that this conflict still exists.  Commit bcfe06bf2622
> > > is now in the net-next tree.  
> > 
> > Thanks, Stephen!
> > 
> > I wonder if it's better to update these 2 commits in the mm tree to avoid
> > conflicts?
> > 
> > Basically split your fix into two and merge it into mm commits.
> > The last chunk in the patch should be merged into "mm/memcg: remove 
> > incorrect comment".
> > And the rest into "mm: move lruvec stats update functions to vmstat.h".
> > 
> > Andrew, what do you think?  
> 
> I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats
> update functions to vmstat.h" staged against Linus's tree and plan to
> send them to him later today.  So I trust the BPF tree maintainers will
> be able to resolve these minor things when those patches turn up in
> mainline.

Hm. The code is in net-next by now. I was thinking of sending the
Networking PR later today (tonight?) as well. I'm happy to hold off 
or do whatever you require, but I'd appreciate more explicit / noob
friendly instructions.

AFAIU all we can do is tell Linus about the merge issue, and point 
at Stephen's resolution.


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Andrew Morton
On Mon, 14 Dec 2020 17:29:43 -0800 Roman Gushchin  wrote:

> On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell  
> > wrote:
> > >
> > > Today's linux-next merge of the akpm-current tree got conflicts in:
> > > 
> > >   include/linux/memcontrol.h
> > >   mm/memcontrol.c
> > > 
> > > between commit:
> > > 
> > >   bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data")
> > > 
> > > from the bpf-next tree and commits:
> > > 
> > >   6771a349b8c3 ("mm/memcg: remove incorrect comment")
> > >   c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")
> > > 
> > > from the akpm-current tree.
> > > 
> ...
> > 
> > Just a reminder that this conflict still exists.  Commit bcfe06bf2622
> > is now in the net-next tree.
> 
> Thanks, Stephen!
> 
> I wonder if it's better to update these 2 commits in the mm tree to avoid
> conflicts?
> 
> Basically split your fix into two and merge it into mm commits.
> The last chunk in the patch should be merged into "mm/memcg: remove incorrect 
> comment".
> And the rest into "mm: move lruvec stats update functions to vmstat.h".
> 
> Andrew, what do you think?

I have "mm/memcg: remove incorrect comment" and "mm: move lruvec stats
update functions to vmstat.h" staged against Linus's tree and plan to
send them to him later today.  So I trust the BPF tree maintainers will
be able to resolve these minor things when those patches turn up in
mainline.





Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Roman Gushchin
On Tue, Dec 15, 2020 at 07:21:56AM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell  
> wrote:
> >
> > Today's linux-next merge of the akpm-current tree got conflicts in:
> > 
> >   include/linux/memcontrol.h
> >   mm/memcontrol.c
> > 
> > between commit:
> > 
> >   bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data")
> > 
> > from the bpf-next tree and commits:
> > 
> >   6771a349b8c3 ("mm/memcg: remove incorrect comment")
> >   c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")
> > 
> > from the akpm-current tree.
> > 
> > I fixed it up (see below - I used the latter version of memcontrol.h)
> > 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.
> > 
> > I also added this merge fix patch:
> > 
> > From: Stephen Rothwell 
> > Date: Fri, 4 Dec 2020 19:53:40 +1100
> > Subject: [PATCH] fixup for "mm: move lruvec stats update functions to 
> > vmstat.h"
> > 
> > conflict against "mm: memcontrol: Use helpers to read page's memcg data"
> > 
> > Signed-off-by: Stephen Rothwell 
> > ---
> >  mm/memcontrol.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index 6f5733779927..3b6db4e906b5 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum 
> > node_stat_item idx,
> >  int val)
> >  {
> > struct page *head = compound_head(page); /* rmap on tail pages */
> > +   struct mem_cgroup *memcg = page_memcg(head);
> > pg_data_t *pgdat = page_pgdat(page);
> > struct lruvec *lruvec;
> >  
> > /* Untracked pages have no memcg, no lruvec. Update only the node */
> > -   if (!head->mem_cgroup) {
> > +   if (!memcg) {
> > __mod_node_page_state(pgdat, idx, val);
> > return;
> > }
> >  
> > -   lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat);
> > +   lruvec = mem_cgroup_lruvec(memcg, pgdat);
> > __mod_lruvec_state(lruvec, idx, val);
> >  }
> >  
> > -- 
> > 2.29.2
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> > 
> > diff --cc include/linux/memcontrol.h
> > index 320369c841f5,ff02f831e7e1..
> > --- a/include/linux/memcontrol.h
> > +++ b/include/linux/memcontrol.h
> > diff --cc mm/memcontrol.c
> > index 7535042ac1ec,c9a5dce4343d..
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cg
> >   
> >   static void commit_charge(struct page *page, struct mem_cgroup *memcg)
> >   {
> >  -  VM_BUG_ON_PAGE(page->mem_cgroup, page);
> >  +  VM_BUG_ON_PAGE(page_memcg(page), page);
> > /*
> > -* Any of the following ensures page->mem_cgroup stability:
> > +* Any of the following ensures page's memcg stability:
> >  *
> >  * - the page lock
> >  * - LRU isolation
> > @@@ -6977,11 -7012,10 +6997,10 @@@ void mem_cgroup_migrate(struct page *ol
> > return;
> >   
> > /* Page cache replacement: new page already charged? */
> >  -  if (newpage->mem_cgroup)
> >  +  if (page_memcg(newpage))
> > return;
> >   
> > -   /* Swapcache readahead pages can get replaced before being charged */
> >  -  memcg = oldpage->mem_cgroup;
> >  +  memcg = page_memcg(oldpage);
> > if (!memcg)
> > return;
> >   
> 
> Just a reminder that this conflict still exists.  Commit bcfe06bf2622
> is now in the net-next tree.

Thanks, Stephen!

I wonder if it's better to update these 2 commits in the mm tree to avoid
conflicts?

Basically split your fix into two and merge it into mm commits.
The last chunk in the patch should be merged into "mm/memcg: remove incorrect 
comment".
And the rest into "mm: move lruvec stats update functions to vmstat.h".

Andrew, what do you think?

Thanks!


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-14 Thread Stephen Rothwell
Hi all,

On Fri, 4 Dec 2020 20:20:05 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the akpm-current tree got conflicts in:
> 
>   include/linux/memcontrol.h
>   mm/memcontrol.c
> 
> between commit:
> 
>   bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data")
> 
> from the bpf-next tree and commits:
> 
>   6771a349b8c3 ("mm/memcg: remove incorrect comment")
>   c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")
> 
> from the akpm-current tree.
> 
> I fixed it up (see below - I used the latter version of memcontrol.h)
> 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.
> 
> I also added this merge fix patch:
> 
> From: Stephen Rothwell 
> Date: Fri, 4 Dec 2020 19:53:40 +1100
> Subject: [PATCH] fixup for "mm: move lruvec stats update functions to 
> vmstat.h"
> 
> conflict against "mm: memcontrol: Use helpers to read page's memcg data"
> 
> Signed-off-by: Stephen Rothwell 
> ---
>  mm/memcontrol.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 6f5733779927..3b6db4e906b5 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum 
> node_stat_item idx,
>int val)
>  {
>   struct page *head = compound_head(page); /* rmap on tail pages */
> + struct mem_cgroup *memcg = page_memcg(head);
>   pg_data_t *pgdat = page_pgdat(page);
>   struct lruvec *lruvec;
>  
>   /* Untracked pages have no memcg, no lruvec. Update only the node */
> - if (!head->mem_cgroup) {
> + if (!memcg) {
>   __mod_node_page_state(pgdat, idx, val);
>   return;
>   }
>  
> - lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat);
> + lruvec = mem_cgroup_lruvec(memcg, pgdat);
>   __mod_lruvec_state(lruvec, idx, val);
>  }
>  
> -- 
> 2.29.2
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc include/linux/memcontrol.h
> index 320369c841f5,ff02f831e7e1..
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> diff --cc mm/memcontrol.c
> index 7535042ac1ec,c9a5dce4343d..
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cg
>   
>   static void commit_charge(struct page *page, struct mem_cgroup *memcg)
>   {
>  -VM_BUG_ON_PAGE(page->mem_cgroup, page);
>  +VM_BUG_ON_PAGE(page_memcg(page), page);
>   /*
> -  * Any of the following ensures page->mem_cgroup stability:
> +  * Any of the following ensures page's memcg stability:
>*
>* - the page lock
>* - LRU isolation
> @@@ -6977,11 -7012,10 +6997,10 @@@ void mem_cgroup_migrate(struct page *ol
>   return;
>   
>   /* Page cache replacement: new page already charged? */
>  -if (newpage->mem_cgroup)
>  +if (page_memcg(newpage))
>   return;
>   
> - /* Swapcache readahead pages can get replaced before being charged */
>  -memcg = oldpage->mem_cgroup;
>  +memcg = page_memcg(oldpage);
>   if (!memcg)
>   return;
>   

Just a reminder that this conflict still exists.  Commit bcfe06bf2622
is now in the net-next tree.

-- 
Cheers,
Stephen Rothwell


pgpzXGTUyFFak.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-12-04 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the akpm-current tree got conflicts in:

  include/linux/memcontrol.h
  mm/memcontrol.c

between commit:

  bcfe06bf2622 ("mm: memcontrol: Use helpers to read page's memcg data")

from the bpf-next tree and commits:

  6771a349b8c3 ("mm/memcg: remove incorrect comment")
  c3970fcb1f21 ("mm: move lruvec stats update functions to vmstat.h")

from the akpm-current tree.

I fixed it up (see below - I used the latter version of memcontrol.h)
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.

I also added this merge fix patch:

From: Stephen Rothwell 
Date: Fri, 4 Dec 2020 19:53:40 +1100
Subject: [PATCH] fixup for "mm: move lruvec stats update functions to vmstat.h"

conflict against "mm: memcontrol: Use helpers to read page's memcg data"

Signed-off-by: Stephen Rothwell 
---
 mm/memcontrol.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6f5733779927..3b6db4e906b5 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -851,16 +851,17 @@ void __mod_lruvec_page_state(struct page *page, enum 
node_stat_item idx,
 int val)
 {
struct page *head = compound_head(page); /* rmap on tail pages */
+   struct mem_cgroup *memcg = page_memcg(head);
pg_data_t *pgdat = page_pgdat(page);
struct lruvec *lruvec;
 
/* Untracked pages have no memcg, no lruvec. Update only the node */
-   if (!head->mem_cgroup) {
+   if (!memcg) {
__mod_node_page_state(pgdat, idx, val);
return;
}
 
-   lruvec = mem_cgroup_lruvec(head->mem_cgroup, pgdat);
+   lruvec = mem_cgroup_lruvec(memcg, pgdat);
__mod_lruvec_state(lruvec, idx, val);
 }
 
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/memcontrol.h
index 320369c841f5,ff02f831e7e1..
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
diff --cc mm/memcontrol.c
index 7535042ac1ec,c9a5dce4343d..
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@@ -2880,9 -2984,9 +2975,9 @@@ static void cancel_charge(struct mem_cg
  
  static void commit_charge(struct page *page, struct mem_cgroup *memcg)
  {
 -  VM_BUG_ON_PAGE(page->mem_cgroup, page);
 +  VM_BUG_ON_PAGE(page_memcg(page), page);
/*
-* Any of the following ensures page->mem_cgroup stability:
+* Any of the following ensures page's memcg stability:
 *
 * - the page lock
 * - LRU isolation
@@@ -6977,11 -7012,10 +6997,10 @@@ void mem_cgroup_migrate(struct page *ol
return;
  
/* Page cache replacement: new page already charged? */
 -  if (newpage->mem_cgroup)
 +  if (page_memcg(newpage))
return;
  
-   /* Swapcache readahead pages can get replaced before being charged */
 -  memcg = oldpage->mem_cgroup;
 +  memcg = page_memcg(oldpage);
if (!memcg)
return;
  


pgpuX9VhKRchQ.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-30 Thread Al Viro
On Wed, Apr 29, 2020 at 06:24:06PM +1000, Stephen Rothwell wrote:
> Hi Christoph,
> 
> On Wed, 29 Apr 2020 08:54:04 +0200 Christoph Hellwig  wrote:
> >
> > On Tue, Apr 28, 2020 at 11:49:34PM -0700, Alexei Starovoitov wrote:
> > > On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig  wrote:  
> > > >
> > > > On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:  
> > > > >
> > > > > Today's linux-next merge of the akpm-current tree got a conflict in:
> > > > >
> > > > >   kernel/sysctl.c
> > > > >
> > > > > between commit:
> > > > >
> > > > >   f461d2dcd511 ("sysctl: avoid forward declarations")
> > > > >
> > > > > from the bpf-next tree and commits:  
> > > >
> > > > Hmm, the above should have gone in through Al..  
> > > 
> > > Al pushed them into vfs tree and we pulled that tag into bpf-next.  
> > 
> > Ok.  And Stephen pulled your tree first.
> 
> No, it is not in the branch I fetch from Al yet.

Now it is...


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-29 Thread Stephen Rothwell
Hi Christoph,

On Wed, 29 Apr 2020 08:54:04 +0200 Christoph Hellwig  wrote:
>
> On Tue, Apr 28, 2020 at 11:49:34PM -0700, Alexei Starovoitov wrote:
> > On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig  wrote:  
> > >
> > > On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:  
> > > >
> > > > Today's linux-next merge of the akpm-current tree got a conflict in:
> > > >
> > > >   kernel/sysctl.c
> > > >
> > > > between commit:
> > > >
> > > >   f461d2dcd511 ("sysctl: avoid forward declarations")
> > > >
> > > > from the bpf-next tree and commits:  
> > >
> > > Hmm, the above should have gone in through Al..  
> > 
> > Al pushed them into vfs tree and we pulled that tag into bpf-next.  
> 
> Ok.  And Stephen pulled your tree first.

No, it is not in the branch I fetch from Al yet.

-- 
Cheers,
Stephen Rothwell


pgpP0rsE3S4kk.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-29 Thread Christoph Hellwig
On Tue, Apr 28, 2020 at 11:49:34PM -0700, Alexei Starovoitov wrote:
> On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig  wrote:
> >
> > On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> > > Hi all,
> > >
> > > Today's linux-next merge of the akpm-current tree got a conflict in:
> > >
> > >   kernel/sysctl.c
> > >
> > > between commit:
> > >
> > >   f461d2dcd511 ("sysctl: avoid forward declarations")
> > >
> > > from the bpf-next tree and commits:
> >
> > Hmm, the above should have gone in through Al..
> 
> Al pushed them into vfs tree and we pulled that tag into bpf-next.

Ok.  And Stephen pulled your tree first.


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-29 Thread Alexei Starovoitov
On Tue, Apr 28, 2020 at 11:47 PM Christoph Hellwig  wrote:
>
> On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> > Hi all,
> >
> > Today's linux-next merge of the akpm-current tree got a conflict in:
> >
> >   kernel/sysctl.c
> >
> > between commit:
> >
> >   f461d2dcd511 ("sysctl: avoid forward declarations")
> >
> > from the bpf-next tree and commits:
>
> Hmm, the above should have gone in through Al..

Al pushed them into vfs tree and we pulled that tag into bpf-next.


Re: linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-29 Thread Christoph Hellwig
On Wed, Apr 29, 2020 at 04:45:07PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the akpm-current tree got a conflict in:
> 
>   kernel/sysctl.c
> 
> between commit:
> 
>   f461d2dcd511 ("sysctl: avoid forward declarations")
> 
> from the bpf-next tree and commits:

Hmm, the above should have gone in through Al..


linux-next: manual merge of the akpm-current tree with the bpf-next tree

2020-04-29 Thread Stephen Rothwell
Hi all,

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

  kernel/sysctl.c

between commit:

  f461d2dcd511 ("sysctl: avoid forward declarations")

from the bpf-next tree and commits:

  0fe73f87ba37 ("parisc: add sysctl file interface panic_on_stackoverflow")
  631b6d13906c ("kernel/hung_task.c: introduce sysctl to print all traces when 
a hung task is detected")
  0defdd249368 ("panic: add sysctl to dump all CPUs backtraces on oops event")

from the akpm-current 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 kernel/sysctl.c
index e961286d0e14,d6e728e3e99f..
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@@ -1576,1732 -3376,89 +1576,1756 @@@ int proc_do_large_bitmap(struct ctl_tab
return -ENOSYS;
  }
  
 -int proc_dointvec_minmax(struct ctl_table *table, int write,
 -  void __user *buffer, size_t *lenp, loff_t *ppos)
 +#endif /* CONFIG_PROC_SYSCTL */
 +
 +#if defined(CONFIG_SYSCTL)
 +int proc_do_static_key(struct ctl_table *table, int write,
 + void *buffer, size_t *lenp, loff_t *ppos)
  {
 -  return -ENOSYS;
 +  struct static_key *key = (struct static_key *)table->data;
 +  static DEFINE_MUTEX(static_key_mutex);
 +  int val, ret;
 +  struct ctl_table tmp = {
 +  .data   = ,
 +  .maxlen = sizeof(val),
 +  .mode   = table->mode,
 +  .extra1 = SYSCTL_ZERO,
 +  .extra2 = SYSCTL_ONE,
 +  };
 +
 +  if (write && !capable(CAP_SYS_ADMIN))
 +  return -EPERM;
 +
 +  mutex_lock(_key_mutex);
 +  val = static_key_enabled(key);
 +  ret = proc_dointvec_minmax(, write, buffer, lenp, ppos);
 +  if (write && !ret) {
 +  if (val)
 +  static_key_enable(key);
 +  else
 +  static_key_disable(key);
 +  }
 +  mutex_unlock(_key_mutex);
 +  return ret;
  }
  
 -int proc_douintvec_minmax(struct ctl_table *table, int write,
 -void __user *buffer, size_t *lenp, loff_t *ppos)
 -{
 -  return -ENOSYS;
 -}
 +static struct ctl_table kern_table[] = {
 +  {
 +  .procname   = "sched_child_runs_first",
 +  .data   = _sched_child_runs_first,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,
 +  .proc_handler   = proc_dointvec,
 +  },
 +#ifdef CONFIG_SCHED_DEBUG
 +  {
 +  .procname   = "sched_min_granularity_ns",
 +  .data   = _sched_min_granularity,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,
 +  .proc_handler   = sched_proc_update_handler,
 +  .extra1 = _sched_granularity_ns,
 +  .extra2 = _sched_granularity_ns,
 +  },
 +  {
 +  .procname   = "sched_latency_ns",
 +  .data   = _sched_latency,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,
 +  .proc_handler   = sched_proc_update_handler,
 +  .extra1 = _sched_granularity_ns,
 +  .extra2 = _sched_granularity_ns,
 +  },
 +  {
 +  .procname   = "sched_wakeup_granularity_ns",
 +  .data   = _sched_wakeup_granularity,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,
 +  .proc_handler   = sched_proc_update_handler,
 +  .extra1 = _wakeup_granularity_ns,
 +  .extra2 = _wakeup_granularity_ns,
 +  },
 +#ifdef CONFIG_SMP
 +  {
 +  .procname   = "sched_tunable_scaling",
 +  .data   = _sched_tunable_scaling,
 +  .maxlen = sizeof(enum sched_tunable_scaling),
 +  .mode   = 0644,
 +  .proc_handler   = sched_proc_update_handler,
 +  .extra1 = _sched_tunable_scaling,
 +  .extra2 = _sched_tunable_scaling,
 +  },
 +  {
 +  .procname   = "sched_migration_cost_ns",
 +  .data   = _sched_migration_cost,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,
 +  .proc_handler   = proc_dointvec,
 +  },
 +  {
 +  .procname   = "sched_nr_migrate",
 +  .data   = _sched_nr_migrate,
 +  .maxlen = sizeof(unsigned int),
 +  .mode   = 0644,