* Re: [patch] Mixed Madison and Montecito system support
[not found] <200610130325.k9D3PwIo17962445@clink.americas.sgi.com>
@ 2006-10-23 20:56 ` Luck, Tony
2006-10-25 0:56 ` Russ Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Luck, Tony @ 2006-10-23 20:56 UTC (permalink / raw)
To: Russ Anderson; +Cc: linux-ia64, linux-kernel
Cc: linux-kernel for generic bit of this change. Rest of patch was
posted to linux-ia64: http://marc.theaimsgroup.com/?l=linux-ia64&m=116070997529216&w=2
On Thu, Oct 12, 2006 at 10:25:58PM -0500, Russ Anderson wrote:
> int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
> {
> - int err = 0;
> + int err = 0, c;
>
> #ifdef CONFIG_SCHED_SMT
> - if (smt_capable())
> - err = sysfs_create_file(&cls->kset.kobj,
> + for_each_online_cpu(c)
> + if (smt_capable(c)) {
> + err = sysfs_create_file(&cls->kset.kobj,
> &attr_sched_smt_power_savings.attr);
> + break;
> + }
> #endif
What if you booted an all-Madison system, and then hot-plugged some
Montecitos later? Either we'd need the hotplug cpu code to run through
this routine again to re-test whether any cpu has multi-thread support
(it doesn't look like it does that now).
Or perhaps it would be simpler to dispense with this test and always
call sysfs_create_file() here (still inside CONFIG_SCHED_SMT) so that
the hook is always present to tune the scheduler (even if it may be
ineffective on a no-smt system)?
-Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Mixed Madison and Montecito system support
2006-10-23 20:56 ` [patch] Mixed Madison and Montecito system support Luck, Tony
@ 2006-10-25 0:56 ` Russ Anderson
2006-10-25 23:42 ` Siddha, Suresh B
0 siblings, 1 reply; 4+ messages in thread
From: Russ Anderson @ 2006-10-25 0:56 UTC (permalink / raw)
To: Luck, Tony; +Cc: Russ Anderson, linux-ia64, linux-kernel
Tony Luck wrote:
>
> Cc: linux-kernel for generic bit of this change. Rest of patch was
> posted to linux-ia64: http://marc.theaimsgroup.com/?l=linux-ia64&m=116070997529216&w=2
>
> On Thu, Oct 12, 2006 at 10:25:58PM -0500, Russ Anderson wrote:
> > int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
> > {
> > - int err = 0;
> > + int err = 0, c;
> >
> > #ifdef CONFIG_SCHED_SMT
> > - if (smt_capable())
> > - err = sysfs_create_file(&cls->kset.kobj,
> > + for_each_online_cpu(c)
> > + if (smt_capable(c)) {
> > + err = sysfs_create_file(&cls->kset.kobj,
> > &attr_sched_smt_power_savings.attr);
> > + break;
> > + }
> > #endif
>
> What if you booted an all-Madison system, and then hot-plugged some
> Montecitos later? Either we'd need the hotplug cpu code to run through
> this routine again to re-test whether any cpu has multi-thread support
> (it doesn't look like it does that now).
>
> Or perhaps it would be simpler to dispense with this test and always
> call sysfs_create_file() here (still inside CONFIG_SCHED_SMT) so that
> the hook is always present to tune the scheduler (even if it may be
> ineffective on a no-smt system)?
I like that idea. Any objections or comments?
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Mixed Madison and Montecito system support
2006-10-25 0:56 ` Russ Anderson
@ 2006-10-25 23:42 ` Siddha, Suresh B
2006-10-26 16:44 ` Russ Anderson
0 siblings, 1 reply; 4+ messages in thread
From: Siddha, Suresh B @ 2006-10-25 23:42 UTC (permalink / raw)
To: Russ Anderson; +Cc: Luck, Tony, linux-ia64, linux-kernel
On Tue, Oct 24, 2006 at 07:56:45PM -0500, Russ Anderson wrote:
> Tony Luck wrote:
> >
> > Cc: linux-kernel for generic bit of this change. Rest of patch was
> > posted to linux-ia64: http://marc.theaimsgroup.com/?l=linux-ia64&m=116070997529216&w=2
> >
> > On Thu, Oct 12, 2006 at 10:25:58PM -0500, Russ Anderson wrote:
> > > int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
> > > {
> > > - int err = 0;
> > > + int err = 0, c;
> > >
> > > #ifdef CONFIG_SCHED_SMT
> > > - if (smt_capable())
> > > - err = sysfs_create_file(&cls->kset.kobj,
> > > + for_each_online_cpu(c)
> > > + if (smt_capable(c)) {
> > > + err = sysfs_create_file(&cls->kset.kobj,
> > > &attr_sched_smt_power_savings.attr);
> > > + break;
> > > + }
> > > #endif
> >
> > What if you booted an all-Madison system, and then hot-plugged some
> > Montecitos later? Either we'd need the hotplug cpu code to run through
> > this routine again to re-test whether any cpu has multi-thread support
> > (it doesn't look like it does that now).
> >
> > Or perhaps it would be simpler to dispense with this test and always
> > call sysfs_create_file() here (still inside CONFIG_SCHED_SMT) so that
> > the hook is always present to tune the scheduler (even if it may be
> > ineffective on a no-smt system)?
>
> I like that idea. Any objections or comments?
I added it so that these entries will not confuse users of a non-smt/mc
systems. But mixed type of processors and cpu hotplug really complicates the
things..
May be a check of something like "is this platform capable of
supporting any multi-core/multi-threaded processor package?" helps..
As there is no well defined mechanism to find out that and for simplicity
reasons, we should probably go with Tony's suggestion.
Russ I can post a patch, removing both smt_capable() and mc_capable()
checks.
Today this sysfs variable is not documented. But when it happens, we
need to clearly document that these variables have no meaning when
the system doesn't have cpus with threads/cores.
thanks,
suresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] Mixed Madison and Montecito system support
2006-10-25 23:42 ` Siddha, Suresh B
@ 2006-10-26 16:44 ` Russ Anderson
0 siblings, 0 replies; 4+ messages in thread
From: Russ Anderson @ 2006-10-26 16:44 UTC (permalink / raw)
To: Siddha, Suresh B; +Cc: Russ Anderson, Luck Tony, linux-ia64, linux-kernel
Siddha, Suresh B wrote:
>
> I added it so that these entries will not confuse users of a non-smt/mc
> systems. But mixed type of processors and cpu hotplug really complicates the
> things..
Yes, it does. :-)
> May be a check of something like "is this platform capable of
> supporting any multi-core/multi-threaded processor package?" helps..
>
> As there is no well defined mechanism to find out that and for simplicity
> reasons, we should probably go with Tony's suggestion.
>
> Russ I can post a patch, removing both smt_capable() and mc_capable()
> checks.
Yes, please do.
> Today this sysfs variable is not documented. But when it happens, we
> need to clearly document that these variables have no meaning when
> the system doesn't have cpus with threads/cores.
--
Russ Anderson, OS RAS/Partitioning Project Lead
SGI - Silicon Graphics Inc rja@sgi.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-26 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200610130325.k9D3PwIo17962445@clink.americas.sgi.com>
2006-10-23 20:56 ` [patch] Mixed Madison and Montecito system support Luck, Tony
2006-10-25 0:56 ` Russ Anderson
2006-10-25 23:42 ` Siddha, Suresh B
2006-10-26 16:44 ` Russ Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox