Hi Neelam, Neelam wrote: > Hi, > > I am profiling some workloads for the voluntary and involuntary context > switches. I am interested in finding out the reasons causing these two types > of context switches. As far as I understand, involuntary context switch > happens on expiration of time slice or when a higher priority process comes > in. While the voluntary switch generally happens when a process is waiting > for I/O etc. > > So to find out what system calls are causing voluntary context switches in my > workloads, I printed whenever a system calls is invoked and whenever a > context switch happens. I am profiling the system calls and context switched > inside critical sections (while some lock is being held). > > But I see something unexpected. I see > > * Voluntary context switches occur almost every time due to doorfs() > system call. They do occur for a few times due to lwp_park() and very > few times due to yield(). > > * Involuntary happens anytime. (lwp_park(), read(), fstat(), putmsg(), > gtime() and sometime without any system call!!) > > Does anyone have any idea, what could be the reason for this unexpected > behavior? > This behavior is not unexpected. In general, threads should not be sleeping while holding locks. What do you think is unexpected? max
> Thanks, > Neelam > > > -- > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss@opensolaris.org > > _______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org