linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the sysctl tree with the tip tree
@ 2022-03-15  9:18 Stephen Rothwell
  2022-03-15 20:17 ` Luis Chamberlain
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2022-03-15  9:18 UTC (permalink / raw)
  To: Luis Chamberlain, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Peter Zijlstra
  Cc: Dietmar Eggemann, Linux Kernel Mailing List,
	Linux Next Mailing List, Zhen Ni

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

Hi all,

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

  kernel/sched/deadline.c

between commit:

  eb77cf1c151c ("sched/deadline: Remove unused def_dl_bandwidth")

from the tip tree and commit:

  ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")

from the sysctl 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/sched/deadline.c
index 11cdc6d0c45f,9ed9ace11151..000000000000
--- a/kernel/sched/deadline.c
+++ b/kernel/sched/deadline.c
@@@ -18,6 -18,42 +18,40 @@@
  #include "sched.h"
  #include "pelt.h"
  
 -struct dl_bandwidth def_dl_bandwidth;
 -
+ /*
+  * Default limits for DL period; on the top end we guard against small util
+  * tasks still getting ridiculously long effective runtimes, on the bottom end we
+  * guard against timer DoS.
+  */
+ static unsigned int sysctl_sched_dl_period_max = 1 << 22; /* ~4 seconds */
+ static unsigned int sysctl_sched_dl_period_min = 100;     /* 100 us */
+ #ifdef CONFIG_SYSCTL
+ static struct ctl_table sched_dl_sysctls[] = {
+ 	{
+ 		.procname       = "sched_deadline_period_max_us",
+ 		.data           = &sysctl_sched_dl_period_max,
+ 		.maxlen         = sizeof(unsigned int),
+ 		.mode           = 0644,
+ 		.proc_handler   = proc_dointvec,
+ 	},
+ 	{
+ 		.procname       = "sched_deadline_period_min_us",
+ 		.data           = &sysctl_sched_dl_period_min,
+ 		.maxlen         = sizeof(unsigned int),
+ 		.mode           = 0644,
+ 		.proc_handler   = proc_dointvec,
+ 	},
+ 	{}
+ };
+ 
+ static int __init sched_dl_sysctl_init(void)
+ {
+ 	register_sysctl_init("kernel", sched_dl_sysctls);
+ 	return 0;
+ }
+ late_initcall(sched_dl_sysctl_init);
+ #endif
+ 
  static inline struct task_struct *dl_task_of(struct sched_dl_entity *dl_se)
  {
  	return container_of(dl_se, struct task_struct, dl);

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

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

* Re: linux-next: manual merge of the sysctl tree with the tip tree
  2022-03-15  9:18 linux-next: manual merge of the sysctl tree with the tip tree Stephen Rothwell
@ 2022-03-15 20:17 ` Luis Chamberlain
  2022-03-15 21:02   ` Stephen Rothwell
  0 siblings, 1 reply; 6+ messages in thread
From: Luis Chamberlain @ 2022-03-15 20:17 UTC (permalink / raw)
  To: Stephen Rothwell, Peter Zijlstra
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Dietmar Eggemann,
	Linux Kernel Mailing List, Linux Next Mailing List, Zhen Ni

On Tue, Mar 15, 2022 at 08:18:40PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the sysctl tree got a conflict in:
> 
>   kernel/sched/deadline.c
> 
> between commit:
> 
>   eb77cf1c151c ("sched/deadline: Remove unused def_dl_bandwidth")
> 
> from the tip tree and commit:
> 
>   ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
> 
> from the sysctl tree.

Peter,

to help avoid conflicts I spinned up a sysctl-next tree to collect
different cleanups going on kernel/sysctl.c. I can drop 
ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
but I think we'd still run into conflicts as other sysctls are
trimmed out. Would you be OK in me taking in eb77cf1c151c
("sched/deadline: Remove unused def_dl_bandwidth") to avoid this
conflict?

  Luis

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

* Re: linux-next: manual merge of the sysctl tree with the tip tree
  2022-03-15 20:17 ` Luis Chamberlain
@ 2022-03-15 21:02   ` Stephen Rothwell
  2022-03-15 23:02     ` Luis Chamberlain
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Rothwell @ 2022-03-15 21:02 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: Peter Zijlstra, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Dietmar Eggemann, Linux Kernel Mailing List,
	Linux Next Mailing List, Zhen Ni

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

Hi Luis,

On Tue, 15 Mar 2022 13:17:43 -0700 Luis Chamberlain <mcgrof@kernel.org> wrote:
>
> On Tue, Mar 15, 2022 at 08:18:40PM +1100, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the sysctl tree got a conflict in:
> > 
> >   kernel/sched/deadline.c
> > 
> > between commit:
> > 
> >   eb77cf1c151c ("sched/deadline: Remove unused def_dl_bandwidth")
> > 
> > from the tip tree and commit:
> > 
> >   ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
> > 
> > from the sysctl tree.  
> 
> Peter,
> 
> to help avoid conflicts I spinned up a sysctl-next tree to collect
> different cleanups going on kernel/sysctl.c. I can drop 
> ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
> but I think we'd still run into conflicts as other sysctls are
> trimmed out. Would you be OK in me taking in eb77cf1c151c
> ("sched/deadline: Remove unused def_dl_bandwidth") to avoid this
> conflict?

Its really a trivial conflict and just needs to be mentioned to Linus
in the pull requests.

-- 
Cheers,
Stephen Rothwell

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

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

* Re: linux-next: manual merge of the sysctl tree with the tip tree
  2022-03-15 21:02   ` Stephen Rothwell
@ 2022-03-15 23:02     ` Luis Chamberlain
  0 siblings, 0 replies; 6+ messages in thread
From: Luis Chamberlain @ 2022-03-15 23:02 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Peter Zijlstra, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	Dietmar Eggemann, Linux Kernel Mailing List,
	Linux Next Mailing List, Zhen Ni

On Wed, Mar 16, 2022 at 08:02:15AM +1100, Stephen Rothwell wrote:
> Hi Luis,
> 
> On Tue, 15 Mar 2022 13:17:43 -0700 Luis Chamberlain <mcgrof@kernel.org> wrote:
> >
> > On Tue, Mar 15, 2022 at 08:18:40PM +1100, Stephen Rothwell wrote:
> > > Hi all,
> > > 
> > > Today's linux-next merge of the sysctl tree got a conflict in:
> > > 
> > >   kernel/sched/deadline.c
> > > 
> > > between commit:
> > > 
> > >   eb77cf1c151c ("sched/deadline: Remove unused def_dl_bandwidth")
> > > 
> > > from the tip tree and commit:
> > > 
> > >   ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
> > > 
> > > from the sysctl tree.  
> > 
> > Peter,
> > 
> > to help avoid conflicts I spinned up a sysctl-next tree to collect
> > different cleanups going on kernel/sysctl.c. I can drop 
> > ebb891f03580 ("sched: Move deadline_period sysctls to deadline.c")
> > but I think we'd still run into conflicts as other sysctls are
> > trimmed out. Would you be OK in me taking in eb77cf1c151c
> > ("sched/deadline: Remove unused def_dl_bandwidth") to avoid this
> > conflict?
> 
> Its really a trivial conflict and just needs to be mentioned to Linus
> in the pull requests.

Ah alrighty! Thanks!

  Luis

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

* Re: linux-next: manual merge of the sysctl tree with the tip tree
  2022-02-22 23:52 broonie
@ 2022-02-23  0:06 ` Luis Chamberlain
  0 siblings, 0 replies; 6+ messages in thread
From: Luis Chamberlain @ 2022-02-23  0:06 UTC (permalink / raw)
  To: broonie, Peter Zijlstra
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Stephen Rothwell, sujiaxun, tangmeng, zhanglianjie, Zhen Ni

On Tue, Feb 22, 2022 at 11:52:18PM +0000, broonie@kernel.org wrote:
> Hi all,
> 
> Today's linux-next merge of the sysctl tree got conflicts in:
> 
>   include/linux/sched/sysctl.h
>   kernel/sysctl.c
> 
> between commit:
> 
>   c8eaf6ac76f40 ("sched: move autogroup sysctls into its own file")

Peter, would you prefer if I just take this one commit? The syctl
changes keep coming. Let me know!

  Luis

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

* linux-next: manual merge of the sysctl tree with the tip tree
@ 2022-02-22 23:52 broonie
  2022-02-23  0:06 ` Luis Chamberlain
  0 siblings, 1 reply; 6+ messages in thread
From: broonie @ 2022-02-22 23:52 UTC (permalink / raw)
  To: Luis Chamberlain
  Cc: Linux Kernel Mailing List, Linux Next Mailing List,
	Peter Zijlstra, Stephen Rothwell, sujiaxun, tangmeng,
	zhanglianjie, Zhen Ni

Hi all,

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

  include/linux/sched/sysctl.h
  kernel/sysctl.c

between commit:

  c8eaf6ac76f40 ("sched: move autogroup sysctls into its own file")

from the tip tree and commits:

  fc12aa67daba8 ("kernel/do_mount_initrd: move real_root_dev sysctls to its own file")
  97d4da3bab169 ("kernel/delayacct: move delayacct sysctls to its own file")
  c7c1839c3c942 ("kernel/acct: move acct sysctls to its own file")
  b5fefe080be0f ("kernel/panic: move panic sysctls to its own file")
  3831fb33e3f35 ("kernel/lockdep: move lockdep sysctls to its own file")
  f31483d6edf09 ("sched: Move energy_aware sysctls to topology.c")
  301ee4d2abae7 ("sched: Move cfs_bandwidth_slice sysctls to fair.c")
  eb862b3dc6dbf ("sched: Move uclamp_util sysctls to core.c")
  4925401d06dc2 ("sched: Move rr_timeslice sysctls to rt.c")
  ebb891f03580b ("sched: Move deadline_period sysctls to deadline.c")
  5f6e55c2485c8 ("sched: Move rt_period/runtime sysctls to rt.c")

from the sysctl 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 include/linux/sched/sysctl.h
index 3f2b70f8d32ce,187d8c1eade69..0000000000000
--- a/include/linux/sched/sysctl.h
+++ b/include/linux/sched/sysctl.h
@@@ -23,46 -21,11 +21,7 @@@ enum sched_tunable_scaling 
  	SCHED_TUNABLESCALING_END,
  };
  
- /*
-  *  control realtime throttling:
-  *
-  *  /proc/sys/kernel/sched_rt_period_us
-  *  /proc/sys/kernel/sched_rt_runtime_us
-  */
- extern unsigned int sysctl_sched_rt_period;
- extern int sysctl_sched_rt_runtime;
- 
- extern unsigned int sysctl_sched_dl_period_max;
- extern unsigned int sysctl_sched_dl_period_min;
- 
- #ifdef CONFIG_UCLAMP_TASK
- extern unsigned int sysctl_sched_uclamp_util_min;
- extern unsigned int sysctl_sched_uclamp_util_max;
- extern unsigned int sysctl_sched_uclamp_util_min_rt_default;
- #endif
- 
- #ifdef CONFIG_CFS_BANDWIDTH
- extern unsigned int sysctl_sched_cfs_bandwidth_slice;
 -#ifdef CONFIG_SCHED_AUTOGROUP
 -extern unsigned int sysctl_sched_autogroup_enabled;
--#endif
- 
- extern int sysctl_sched_rr_timeslice;
- extern int sched_rr_timeslice;
--
- int sched_rr_handler(struct ctl_table *table, int write, void *buffer,
- 		size_t *lenp, loff_t *ppos);
- int sched_rt_handler(struct ctl_table *table, int write, void *buffer,
- 		size_t *lenp, loff_t *ppos);
- int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
- 		void *buffer, size_t *lenp, loff_t *ppos);
  int sysctl_numa_balancing(struct ctl_table *table, int write, void *buffer,
  		size_t *lenp, loff_t *ppos);
- int sysctl_schedstats(struct ctl_table *table, int write, void *buffer,
- 		size_t *lenp, loff_t *ppos);
- 
- #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
- extern unsigned int sysctl_sched_energy_aware;
- int sched_energy_aware_handler(struct ctl_table *table, int write,
- 		void *buffer, size_t *lenp, loff_t *ppos);
- #endif
  
  #endif /* _LINUX_SCHED_SYSCTL_H */
diff --cc kernel/sysctl.c
index 6a494ab55beaf,22037f03cd2bc..0000000000000
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@@ -1701,103 -1654,17 +1663,6 @@@ static struct ctl_table kern_table[] = 
  		.extra2		= SYSCTL_ONE,
  	},
  #endif /* CONFIG_NUMA_BALANCING */
- 	{
- 		.procname	= "sched_rt_period_us",
- 		.data		= &sysctl_sched_rt_period,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= sched_rt_handler,
- 	},
- 	{
- 		.procname	= "sched_rt_runtime_us",
- 		.data		= &sysctl_sched_rt_runtime,
- 		.maxlen		= sizeof(int),
- 		.mode		= 0644,
- 		.proc_handler	= sched_rt_handler,
- 	},
- 	{
- 		.procname	= "sched_deadline_period_max_us",
- 		.data		= &sysctl_sched_dl_period_max,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= proc_dointvec,
- 	},
- 	{
- 		.procname	= "sched_deadline_period_min_us",
- 		.data		= &sysctl_sched_dl_period_min,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= proc_dointvec,
- 	},
- 	{
- 		.procname	= "sched_rr_timeslice_ms",
- 		.data		= &sysctl_sched_rr_timeslice,
- 		.maxlen		= sizeof(int),
- 		.mode		= 0644,
- 		.proc_handler	= sched_rr_handler,
- 	},
- #ifdef CONFIG_UCLAMP_TASK
- 	{
- 		.procname	= "sched_util_clamp_min",
- 		.data		= &sysctl_sched_uclamp_util_min,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= sysctl_sched_uclamp_handler,
- 	},
- 	{
- 		.procname	= "sched_util_clamp_max",
- 		.data		= &sysctl_sched_uclamp_util_max,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= sysctl_sched_uclamp_handler,
- 	},
- 	{
- 		.procname	= "sched_util_clamp_min_rt_default",
- 		.data		= &sysctl_sched_uclamp_util_min_rt_default,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= sysctl_sched_uclamp_handler,
- 	},
- #endif
- #ifdef CONFIG_CFS_BANDWIDTH
 -#ifdef CONFIG_SCHED_AUTOGROUP
--	{
- 		.procname	= "sched_cfs_bandwidth_slice_us",
- 		.data		= &sysctl_sched_cfs_bandwidth_slice,
 -		.procname	= "sched_autogroup_enabled",
 -		.data		= &sysctl_sched_autogroup_enabled,
--		.maxlen		= sizeof(unsigned int),
--		.mode		= 0644,
--		.proc_handler	= proc_dointvec_minmax,
- 		.extra1		= SYSCTL_ONE,
- 	},
- #endif
- #if defined(CONFIG_ENERGY_MODEL) && defined(CONFIG_CPU_FREQ_GOV_SCHEDUTIL)
- 	{
- 		.procname	= "sched_energy_aware",
- 		.data		= &sysctl_sched_energy_aware,
- 		.maxlen		= sizeof(unsigned int),
- 		.mode		= 0644,
- 		.proc_handler	= sched_energy_aware_handler,
--		.extra1		= SYSCTL_ZERO,
--		.extra2		= SYSCTL_ONE,
- 	},
- #endif
- #ifdef CONFIG_PROVE_LOCKING
- 	{
- 		.procname	= "prove_locking",
- 		.data		= &prove_locking,
- 		.maxlen		= sizeof(int),
- 		.mode		= 0644,
- 		.proc_handler	= proc_dointvec,
- 	},
- #endif
- #ifdef CONFIG_LOCK_STAT
- 	{
- 		.procname	= "lock_stat",
- 		.data		= &lock_stat,
- 		.maxlen		= sizeof(int),
- 		.mode		= 0644,
- 		.proc_handler	= proc_dointvec,
--	},
--#endif
  	{
  		.procname	= "panic",
  		.data		= &panic_timeout,

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

end of thread, other threads:[~2022-03-15 23:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-15  9:18 linux-next: manual merge of the sysctl tree with the tip tree Stephen Rothwell
2022-03-15 20:17 ` Luis Chamberlain
2022-03-15 21:02   ` Stephen Rothwell
2022-03-15 23:02     ` Luis Chamberlain
  -- strict thread matches above, loose matches on Subject: below --
2022-02-22 23:52 broonie
2022-02-23  0:06 ` Luis Chamberlain

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).