Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261319AbTEHLTD (ORCPT ); Thu, 8 May 2003 07:19:03 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261320AbTEHLTD (ORCPT ); Thu, 8 May 2003 07:19:03 -0400 Received: from chaos.analogic.com ([204.178.40.224]:60547 "EHLO chaos.analogic.com") by vger.kernel.org with ESMTP id S261319AbTEHLTC (ORCPT ); Thu, 8 May 2003 07:19:02 -0400 Date: Thu, 8 May 2003 07:33:03 -0400 (EDT) From: "Richard B. Johnson" X-X-Sender: root@chaos Reply-To: root@chaos.analogic.com To: Timothy Miller cc: Roland Dreier , Linux kernel Subject: Re: top stack (l)users for 2.5.69 In-Reply-To: <3EB96FB2.2020401@techsource.com> Message-ID: References: <20030507132024.GB18177@wohnheim.fh-wedel.de> <20030507135657.GC18177@wohnheim.fh-wedel.de> <52k7d2pqwm.fsf@topspin.com> <52bryeppb3.fsf@topspin.com> <52n0hyo85x.fsf@topspin.com> <3EB96FB2.2020401@techsource.com> 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 Content-Length: 1422 Lines: 36 On Wed, 7 May 2003, Timothy Miller wrote: > > > Richard B. Johnson wrote: > > > > When a caller executes int 0x80, this is a software interrupt, > > called a 'trap'. It enters the trap handler on the kernel stack, > > with the segment selectors set up as defined for that trap-handler. > > It happens because software told hardware what to do ahead of time. > > Software doesn't do it during the trap event. In the trap handler, > > no context switch normally occurs. > > On typical processors, when one gets an interrupt, the current program > counter and processor state flags are pushed onto a stack. Which stack > gets used for this? > In protected mode, the kernel stack. And, regardless of implimentation details, there can only be one. It's the one whos stack-selector is being used by the CPU. So, in the case of Linux, with multiple kernel stacks (!?????), one for each process, whatever process is running in kernel mode (current) has it's SS active. It's the one that gets hit with the interrupt. Cheers, Dick Johnson Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/