lkml.org 
[lkml]   [2012]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC Patch v1 32/55] ARC: [optim] Cache "current" in Register r25
On Monday 12 November 2012 07:20 PM, Arnd Bergmann wrote:
> On Monday 12 November 2012, Vineet.Gupta1@synopsys.com wrote:
>> endmenu # "Platform Board Configuration"
>>
>> +config ARC_CURR_IN_REG
>> + bool "Dedicate Register r25 for current_task pointer"
>> + default y
>> + help
>> + This reserved Register R25 to point to Current Task in
>> + kernel mode. This saves memory access for each such access
>> +
> This looks like a useful feature if you have 32 GPRs, but why make it
> optional? Are there cases where you would disable it?

Since it touched the low level guts of port, it made sense to start with
a config option in initial implementation. But I've kept it that way
since it annotates the code nicely and implicitly documents how to do
this for any other register + data structure.

> Another alternative to caching "current" would be to cache the per-cpu
> offset, and calculate current from that one.

Good tip - I'll add this to my TODO list -

> Arnd



\
 
 \ /
  Last update: 2012-11-15 12:01    [W:0.046 / U:8.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site