2002-04-23 15:27:57

by J.A. Magallon

[permalink] [raw]
Subject: exporting task_nice in O(1)-sched

Hi.

Found this building bproc. New O(1) scheduler kills the nice field in
task struct. It gives a way to fix the niceness (set_user_nice()), but
the funtion to _query_ is not exported. Any particular reason ?

Patch:

--- linux/kernel/ksyms.c.org 2002-04-23 16:56:27.000000000 +0200
+++ linux/kernel/ksyms.c 2002-04-23 16:56:47.000000000 +0200
@@ -455,6 +455,7 @@
EXPORT_SYMBOL(schedule_timeout);
EXPORT_SYMBOL(sys_sched_yield);
EXPORT_SYMBOL(set_user_nice);
+EXPORT_SYMBOL(task_nice);
#ifdef CONFIG_SMP
EXPORT_SYMBOL_GPL(set_cpus_allowed);
#endif

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre7-jam6 #2 SMP mar abr 23 16:56:56 CEST 2002 i686


2002-04-23 17:16:16

by Robert Love

[permalink] [raw]
Subject: Re: exporting task_nice in O(1)-sched

On Tue, 2002-04-23 at 11:27, J.A. Magallon wrote:

> Found this building bproc. New O(1) scheduler kills the nice field in
> task struct. It gives a way to fix the niceness (set_user_nice()), but
> the funtion to _query_ is not exported. Any particular reason ?

Probably because Ingo intended to hide as many interfaces to the
scheduler as possible and only export those symbols that were needed.

It is safe to export if it is needed.

Robert Love

2002-04-23 17:40:59

by Chris Friesen

[permalink] [raw]
Subject: Re: exporting task_nice in O(1)-sched

Robert Love wrote:
>
> On Tue, 2002-04-23 at 11:27, J.A. Magallon wrote:
>
> > Found this building bproc. New O(1) scheduler kills the nice field in
> > task struct. It gives a way to fix the niceness (set_user_nice()), but
> > the funtion to _query_ is not exported. Any particular reason ?
>
> Probably because Ingo intended to hide as many interfaces to the
> scheduler as possible and only export those symbols that were needed.
>
> It is safe to export if it is needed.

Seems kind of silly to be able to set it but not read it...

--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: [email protected]