public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] task_struct colouring ...
Date: 1 Dec 2001 14:04:43 -0800	[thread overview]
Message-ID: <9ubk5r$ev3$1@cesium.transmeta.com> (raw)
In-Reply-To: <000901c17a51$62526070$010411ac@local>

Followup to:  <000901c17a51$62526070$010411ac@local>
By author:    "Manfred Spraul" <manfred@colorfullife.com>
In newsgroup: linux.dev.kernel
> 
> There are obviously lots of alternatives how to look up the task structure address:
> * bottom of stack allocation (your patch)
> * %cr2 (broken, only works for OS' that never cause page faults such as Netware)
> * gs: (segment register, x86-64 uses that. But i386 doesn't have the swapgs instruction)
> * str (Ben's patch)
> * read from local apic memory (real slow!, uncached memory reference)
> 

%gs on x86-64 actually points to a per-CPU area; as does the proposed
%tr hack.  IMNSHO I think this is a much better idea than having
something that points to "current"; if we do this consistently across
architectures I'm sure there is plenty we can use this per-CPU area
for.

Saving and restoring %gs (or %fs, which is less likely to be used in
userspace, and therefore potentially faster) is probably not
justifiable unless we do at least four accesses to "current" in the
average system call.

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>

  parent reply	other threads:[~2001-12-01 22:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-01 10:17 [PATCH] task_struct colouring Manfred Spraul
2001-12-01 21:49 ` Davide Libenzi
2001-12-01 22:04 ` H. Peter Anvin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-11-30 21:47 Davide Libenzi
2001-11-30 22:40 ` Alan Cox
2001-11-30 23:37   ` H. Peter Anvin
2001-11-30 23:53   ` Davide Libenzi
2001-11-30 23:57     ` Alan Cox
2001-12-01  0:33       ` Davide Libenzi
2001-12-01  1:05         ` H. Peter Anvin
2001-12-01  1:30           ` Davide Libenzi
2001-12-01  1:24             ` H. Peter Anvin
2001-12-01  1:41               ` Davide Libenzi
2001-12-01  1:36                 ` H. Peter Anvin
2001-12-01  9:58               ` Alan Cox
2001-12-01  9:49         ` Alan Cox
2001-12-01 23:37           ` Davide Libenzi
2001-12-01 23:50             ` kumon
2001-12-02  0:11               ` Davide Libenzi
2001-12-02 16:39                 ` Alan Cox
2001-12-02  0:02             ` [MOc]cda*mirabilos
2001-12-02  0:56               ` Davide Libenzi
2001-12-02 15:06                 ` [MOc]cda*mirabilos
2001-12-02 19:49                   ` Davide Libenzi
2001-12-02 19:50                     ` Thorsten Glaser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='9ubk5r$ev3$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox