lkml.org 
[lkml]   [2002]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] move task_struct allocation to arch
Date
From

Roman Zippel <zippel@linux-m68k.org> 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/

\
 
 \ /
  Last update: 2005-03-22 13:24    [W:0.123 / U:1.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site