2003-09-03 14:45:45

by Con Kolivas

[permalink] [raw]
Subject: [PATCH]O20int

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fine tuning mainly.

Smaller timeslice granularity for most interactive tasks and larger for less
interactive. Smaller for each extra cpu.

Smaller bounds on interactive credit.

Idle tasks can gain interactive credits; Idle tasks get more interactivity;
Uninterruptible sleep wakers are not seen as idle.

Kernel threads participate in timeslice granularity requeuing.

This patch is incremental on top of O19int which is included in
2.6.0-test4-mm4. It will not apply onto mm5 which has all my stuff backed
out. This patch and a full patch against 2.6.0-test4 can be found here:

http://kernel.kolivas.org/2.5

Con
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/VgBaZUg7+tp6mRURAtvgAJoClT078T9wLLlEq8+pct3Yigrq3wCgja4P
HjXKw3YJSey4DWpA2I+Tyi4=
=nvCB
-----END PGP SIGNATURE-----


Attachments:
(No filename) (857.00 B)
clearsigned data
patch-O19-O20int (2.70 kB)
Download all attachments

2003-09-03 19:22:50

by Mike Fedyk

[permalink] [raw]
Subject: Re: [PATCH]O20int

On Thu, Sep 04, 2003 at 12:53:10AM +1000, Con Kolivas wrote:
> Smaller timeslice granularity for most interactive tasks and larger for less
> interactive. Smaller for each extra cpu.

> +#ifdef CONFIG_SMP
> +#define TIMESLICE_GRANULARITY(p) \
> + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * \
> + num_online_cpus())
> +#else
> +#define TIMESLICE_GRANULARITY(p) \
> + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))))
> +#endif
> +

Don't you want to put a max(10,TIMESLICE_GRANULARITY) in there so that the
time slice won't go below 1ms for large proc servers? I'm not sure if it
was you, or someone else but they did some testing to see how the
timeslice length affected the cache warmth, and the major improvements
stopped after 7ms, so 10 might be a good default mimimum.

Mike

2003-09-03 22:48:16

by Con Kolivas

[permalink] [raw]
Subject: Re: [PATCH]O20int

On Thu, 4 Sep 2003 05:19, Mike Fedyk wrote:
> On Thu, Sep 04, 2003 at 12:53:10AM +1000, Con Kolivas wrote:
> > Smaller timeslice granularity for most interactive tasks and larger for
> > less interactive. Smaller for each extra cpu.
> >
> > +#ifdef CONFIG_SMP
> > +#define TIMESLICE_GRANULARITY(p) \
> > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * \
> > + num_online_cpus())
> > +#else
> > +#define TIMESLICE_GRANULARITY(p) \
> > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))))
> > +#endif
> > +
>
> Don't you want to put a max(10,TIMESLICE_GRANULARITY) in there so that the
> time slice won't go below 1ms for large proc servers? I'm not sure if it
> was you, or someone else but they did some testing to see how the
> timeslice length affected the cache warmth, and the major improvements
> stopped after 7ms, so 10 might be a good default mimimum.

That works out to 10ms minimum.

Con

2003-09-04 00:19:51

by Con Kolivas

[permalink] [raw]
Subject: Re: [PATCH]O20int

On Thu, 4 Sep 2003 10:12, Mike Fedyk wrote:
> On Thu, Sep 04, 2003 at 08:55:45AM +1000, Con Kolivas wrote:
> > On Thu, 4 Sep 2003 05:19, Mike Fedyk wrote:
> > > On Thu, Sep 04, 2003 at 12:53:10AM +1000, Con Kolivas wrote:
> > > > Smaller timeslice granularity for most interactive tasks and larger
> > > > for less interactive. Smaller for each extra cpu.
> > > >
> > > > +#ifdef CONFIG_SMP
> > > > +#define TIMESLICE_GRANULARITY(p) \
> > > > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * \
> > > > + num_online_cpus())
> > > > +#else
> > > > +#define TIMESLICE_GRANULARITY(p) \
> > > > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))))
> > > > +#endif
> > > > +
> > >
> > > Don't you want to put a max(10,TIMESLICE_GRANULARITY) in there so that
> > > the time slice won't go below 1ms for large proc servers? I'm not sure
> > > if it was you, or someone else but they did some testing to see how the
> > > timeslice length affected the cache warmth, and the major improvements
> > > stopped after 7ms, so 10 might be a good default mimimum.
> >
> > That works out to 10ms minimum.
>
> With how many processors? 64? 128?

1 cpu = 10ms minimum
2 cpus = 20ms minimum
and so on.

MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * num_online_cpus())

works out to:
10 * num_online_cpus()
as the minimum

and

10 * 1024 * num_online_cpus()

as the maximum

Con

2003-09-04 00:12:00

by Mike Fedyk

[permalink] [raw]
Subject: Re: [PATCH]O20int

On Thu, Sep 04, 2003 at 08:55:45AM +1000, Con Kolivas wrote:
> On Thu, 4 Sep 2003 05:19, Mike Fedyk wrote:
> > On Thu, Sep 04, 2003 at 12:53:10AM +1000, Con Kolivas wrote:
> > > Smaller timeslice granularity for most interactive tasks and larger for
> > > less interactive. Smaller for each extra cpu.
> > >
> > > +#ifdef CONFIG_SMP
> > > +#define TIMESLICE_GRANULARITY(p) \
> > > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * \
> > > + num_online_cpus())
> > > +#else
> > > +#define TIMESLICE_GRANULARITY(p) \
> > > + (MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))))
> > > +#endif
> > > +
> >
> > Don't you want to put a max(10,TIMESLICE_GRANULARITY) in there so that the
> > time slice won't go below 1ms for large proc servers? I'm not sure if it
> > was you, or someone else but they did some testing to see how the
> > timeslice length affected the cache warmth, and the major improvements
> > stopped after 7ms, so 10 might be a good default mimimum.
>
> That works out to 10ms minimum.

With how many processors? 64? 128?

2003-09-04 01:52:51

by Mike Fedyk

[permalink] [raw]
Subject: Re: [PATCH]O20int

On Thu, Sep 04, 2003 at 10:27:29AM +1000, Con Kolivas wrote:
> On Thu, 4 Sep 2003 10:12, Mike Fedyk wrote:
> > With how many processors? 64? 128?
>
> 1 cpu = 10ms minimum
> 2 cpus = 20ms minimum
> and so on.
>
> MIN_TIMESLICE * (1 << (MAX_BONUS - CURRENT_BONUS(p))) * num_online_cpus())
>
> works out to:
> 10 * num_online_cpus()
> as the minimum
>
> and
>
> 10 * 1024 * num_online_cpus()
>
> as the maximum

Ok brain fart. I thought you were deviding based on the number of CPUs...
(misread the macro wrap for a "/" devide)

2003-09-07 05:41:33

by Matt Heler

[permalink] [raw]
Subject: Re: [PATCH]O20int

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wow.. I tried 2.6.0-test4-mm4 + your 020 init patch on top .. I've noticed
consiberable improvements. When I last used your scheduler patches WineX used
to pauses in Warcraft3 , now no such pauses exist.. and everything seems
smooth and snappy .. great work

Matt


On Wednesday 03 September 2003 07:53 am, Con Kolivas wrote:
> D----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Fine tuning mainly.
>
> Smaller timeslice granularity for most interactive tasks and larger for
> less interactive. Smaller for each extra cpu.
>
> Smaller bounds on interactive credit.
>
> Idle tasks can gain interactive credits; Idle tasks get more interactivity;
> Uninterruptible sleep wakers are not seen as idle.
>
> Kernel threads participate in timeslice granularity requeuing.
>
> This patch is incremental on top of O19int which is included in
> 2.6.0-test4-mm4. It will not apply onto mm5 which has all my stuff backed
> out. This patch and a full patch against 2.6.0-test4 can be found here:
>
> http://kernel.kolivas.org/2.5
>
> Con
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.2 (GNU/Linux)
>
> iD8DBQE/VgBaZUg7+tp6mRURAtvgAJoClT078T9wLLlEq8+pct3Yigrq3wCgja4P
> HjXKw3YJSey4DWpA2I+Tyi4=
> =nvCB
> -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/WsUUleY/n9G/oZ8RAgXcAJ43BQouqQkq1IVz6ujh1P44xnl/dACfTg4J
6KRKy+GrhNu2FC3rPSruT6M=
=fwqL
-----END PGP SIGNATURE-----