Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 15 Feb 2002 07:57:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 15 Feb 2002 07:57:04 -0500 Received: from dell-paw-3.cambridge.redhat.com ([195.224.55.237]:22510 "HELO executor.cambridge.redhat.com") by vger.kernel.org with SMTP id ; Fri, 15 Feb 2002 07:56:55 -0500 To: Roman Zippel Cc: David Howells , Jeff Garzik , Linus Torvalds , davidm@hpl.hp.com, "David S. Miller" , anton@samba.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] move task_struct allocation to arch In-Reply-To: Message from Roman Zippel of "Fri, 15 Feb 2002 13:20:44 +0100." User-Agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.3 (=?ISO-8859-4?Q?Unebigory=F2mae?=) APEL/10.3 Emacs/21.1 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Date: Fri, 15 Feb 2002 12:56:52 +0000 Message-ID: <23603.1013777812@warthog.cambridge.redhat.com> From: David Howells Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Roman Zippel wrote: > > > That wouldn't be a problem, if ia32 added the needed infrastructure to > > > calculate the structure offsets. > > > > But the offsets aren't fixed. The task structure does not lie adjacent to > > the thread_info structure. > > That's not the problem, I meant this sentence: "This led to Linus > requesting that everything that entry.S needs to access be separated out > into another structure." Splitting the task structure and the stack page > is fine. Keeping the most important fields in the stack page is fine too, > if the architecture requires it. I think I see what you meant. However, I'm not particularly keen on the M68K offset generator. I'm not sure why exactly, but it just doesn't seem the right way to do things... OTOH, without making the assembler able to parse C structs, I'm not sure there is a "right" way:-/ > But the decision what goes into thread_info, should not be made only to > avoid access to task_struct from entry.S. How about I quote Linus (who explained what he wanted better than I did). Firstly, in response to me having supplied a patch that made a set of four byte-size values as the status area in the task_struct: | For the future, the biggest thing I'd like to see is actually to make | "work" be a bitmap, because the "bytes are atomic" approach simply isn't | portable anyway, so we might as well make things _explicitly_ atomic and | use bit operations. Otherwise the alpha version of "work" would have to be | four bytes per "bit" of information, which sounds really excessive. And then after some discussion: | In particular, there's been all that discussion about cache-coloring the | "struct task_struct", and my personal suggestion for that whole can of | worms is to have the "struct low_level" be in the one low cache-line, and | make it contain a pointer to "struct task_struct" - and just split the two | up completely. Then the low-level asm code would never have to even look | at "task_struct", it would only look at this stuff. (struct low_level became thread_info). David - 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/