From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Mon, 23 Sep 2002 16:23:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Mon, 23 Sep 2002 16:23:06 -0400 Received: from mx1.elte.hu ([157.181.1.137]:19634 "HELO mx1.elte.hu") by vger.kernel.org with SMTP id ; Mon, 23 Sep 2002 16:23:06 -0400 Date: Mon, 23 Sep 2002 22:36:28 +0200 (CEST) From: Ingo Molnar Reply-To: Ingo Molnar To: Peter Waechtler Cc: Larry McVoy , Bill Davidsen , , ingo Molnar Subject: Re: [ANNOUNCE] Native POSIX Thread Library 0.1 In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 23 Sep 2002, Peter Waechtler wrote: > Getting into kernel is not the same as a context switch. Return EAGAIN > or EWOULDBLOCK is definetly _not_ causing a context switch. this is a common misunderstanding. When switching from thread to thread in the 1:1 model, most of the cost comes from entering/exiting the kernel. So *once* we are in the kernel the cheapest way is not to piggyback to userspace to do some userspace context-switch - but to do it right in the kernel. in the kernel we can do much higher quality scheduling decisions than in userspace. SMP affinity, various statistics are right available in kernel-space - userspace does not have any of that. Not to talk about preemption. Ingo