lkml.org 
[lkml]   [2003]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Why is get_current() not const function?
From
Date
Jakub Jelinek <jakub@redhat.com> writes:

> E.g. on x86-64,
> NEW_AUX_ENT(AT_UID, (elf_addr_t) current->uid);
> NEW_AUX_ENT(AT_EUID, (elf_addr_t) current->euid);
> NEW_AUX_ENT(AT_GID, (elf_addr_t) current->gid);
> NEW_AUX_ENT(AT_EGID, (elf_addr_t) current->egid);
> results in 4 movq %gs:0,%rax instructions while one is completely
> enough.
> Anyone remembers why get_current function (on arches which define
> current to get_current()) is not const and why on x86-64

I tried it once. Then spent a day in fixing all the obvious problems
(addings lots of compile barriers to early bootup and the scheduler
to make it boot again etc.)

In the end I gave up because there were some weird crashes left
and I ran out of time on this one.

Feel free to retry it, but it'll be lots of work I suspect.

-Andi
-
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:33    [W:0.016 / U:2.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site