Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 5 Jun 2002 11:33:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 5 Jun 2002 11:33:00 -0400 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:33546 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Wed, 5 Jun 2002 11:32:59 -0400 Date: Wed, 5 Jun 2002 08:33:13 -0700 (PDT) From: Linus Torvalds To: Benjamin LaHaise cc: Linux Kernel Subject: Re: [RFC] 4KB stack + irq stack for x86 In-Reply-To: <20020604225539.F9111@redhat.com> 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 Tue, 4 Jun 2002, Benjamin LaHaise wrote: > > Below is a patch against 2.5.20 that implements 4KB stacks for tasks, > plus a seperate 4KB irq stack for use by interrupts. Hmm.. Interesting. However, you seem to be moving only the task structure pointer into the new interrupt stack thread info, which seems to ignore all the "flags" things. So, as far as I can tell, we now get a nasty aliasing issue on "current_thread_info()->flags", and information like NEED_RESCHED and SIGPENDING end up being set in the wrong place. They get set on the _interrupt_ thread_info, not the "process native" thread_info. Or did I miss some subtlety? Note that some of this may be hidden by the fact that not everybody uses the "current_thread_info()" thing, most people still use the old format "tsk->thread_info". For example: "set_need_resched()" -> "set_thread_flag(TIF_NEED_RESCHED)" -> "set_bit(fTIF_NEED_RESCHED,¤t_thread_info()->flags)". So any interrupt causing a "set_need_resched()" would appear to not do the right thing now. Comments? We can deprecate "current_thread_info()", but that would make some things slightly less efficient. Linus - 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/