[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0911191122210.24119@localhost.localdomain>
Date: Thu, 19 Nov 2009 11:36:42 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Sven-Thorsten Dietrich <sven@...bigcorporation.com>
cc: Ingo Molnar <mingo@...e.hu>, Jean Delvare <khali@...ux-fr.org>,
Leon Woestenberg <leon.woestenberg@...il.com>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
linux-i2c@...r.kernel.org,
rt-users <linux-rt-users@...r.kernel.org>,
"Ben Dooks (embedded platforms)" <ben-linux@...ff.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cleanup sched_yield (sys)call nesting.
On Wed, 18 Nov 2009, Sven-Thorsten Dietrich wrote:
> We are trying to get rid of __sched_yield calls from-inside-the-Kernel,
> but sys_sched_yield() from user-space will remain.
>
> This patch breaks out the in-Kernel interface for the yield()
> functionality and deprecates it explicitly.
>
> The sys_sched_yield() variety, however is not deprecated.
>
> The objective is to deprecate *only* the in-kernel calls to
> sched_yield(), in hopes of reducing new calls to sched_yield() being
> added.
Nothing in the kernel calls sched_yield() because there is no such
function.
> Eventually, when the in-Kernel calls are gone, the __sched_yield() would
> be removed, and the first 2 hunks would essentially be reverted, leaving
> only the user-space caller sys_sched_yield.
>
> For the time being we add 2 lines and 2 braces of bulk, in hopes that
> elsewhere this eliminates more __sched_yield() calls being added while
> we work to eliminate the ones that exist already.
Err ? WTF do you need to fiddle in sched.c to deprecate a function ?
Nothing in the kernel calls sys_sched_yield() except the syscall and
the implementation of yield() in sched.c. The drivers,... call yield()
nothing else.
To deprecate yield() all you need is adding __deprecated to the
function prototype in sched.h. And that's the only way you alert users
because it warns when compiling code which _calls_ yield() not when
compiling the implementation in sched.c.
Sigh,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists