From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: -rt kernel hitting yield()s in I2C non-default code paths (2.6.24) Date: Mon, 2 Nov 2009 15:58:47 +0100 (CET) Message-ID: References: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: rt-users To: Leon Woestenberg Return-path: Received: from www.tglx.de ([62.245.132.106]:39163 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754852AbZKBO6r (ORCPT ); Mon, 2 Nov 2009 09:58:47 -0500 In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Sat, 31 Oct 2009, Leon Woestenberg wrote: > Hello, > > > yesterday while debugging embedded systems I noticed the non-happy > paths in the I2C code hitting yield() code, this resulted in > a BUG: RT-Task yielding. This was with 2.6.24 (yes I know). > > A real-time task (prio 99, low real-time priority) on the generic > workqueue was executing I2C functions, such as try_address() and > hitting the yield(). > > http://lxr.linux.no/#linux+v2.6.31/drivers/i2c/algos/i2c-algo-bit.c#L319 > > Further grepping shows yield()s sprinkled throughout device driver > code, especially in the non-default execution paths. > > What's the -rt devs opinion on this one? yield() in kernel code is either a bug or useless nonsense. > For most of the yield()s I really could not think why they are there... Exactly. Most likely some blindly copied old code, which needs to be fixed. Going through it later today. Thanks for pointing it out. tglx