Subject: Re: kprintf locking problem.
To: Anders Magnusson <ragge@ludd.luth.se>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-smp
Date: 06/03/2001 09:32:30
On Sun, Jun 03, 2001 at 09:22:13AM -0700, Jason R Thorpe wrote:

 > #define	KPRINTF_SLOCK_ACQUIRE(alp) \
 > do { \
 > 	struct cpu_info *__ci = curcpu(); \
 > 	\
 > 	while (__cpu_simple_lock_try(&(alp)->lock_data) == 0) { \
 > 		if (__ci->ci_ipis_pending) \
 > 			/* go process them */ ; \
 > 	} \
 > } while (/*CONSTCOND*/0)

Hm, although, Ross and Bill have commented to me that "this probably isn't
confined to the kernel printf slock".  You may actually simply want to put
the IPI check directly in the __cpu_simple_lock() implementation.

-- 
        -- Jason R. Thorpe <thorpej@zembu.com>