Vineet Gupta fd476197c6 ARC: __switch_to: move ksp to thread_info from thread_struct
task's arch specific bits are carried in 2 places
 - embedded thread_struct in task_struct
 - associated thread_info (hoisted in task's stack page) and
   syntactically: (thread_info *)(task_struct->stack)

ksp (dynamic kernel stack top) currently lives in thread_struct but
given its deep location in task struct likely to cache miss when
accessed from  __switch_to(). Moving it to thread_info would be more
efficient given proximity to frequently accessed items such as
preempt_count thus very likely to be in cache, specially in schedular
code.

Note however that currently tsk.thread.ksp takes 1 memory access (off
of tsk pointer) while new code tsk->stack.ksp would take 2, but likely
to be in cache. Moreover if task is current the 2nd reference can be
elided and instead derived from SP as (SP & ~(THREAD_SIZE - 1))

All of this also makes __switch_to() code simpler and we can see the 2
ways of retirving ksp (descrobed above) in new code.

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
2023-08-17 20:31:59 -07:00
..
2023-08-13 08:56:24 -07:00
2023-08-02 18:21:12 -07:00
2023-08-12 09:18:47 -07:00
2023-07-01 21:12:32 -07:00
2023-06-28 20:35:21 -07:00
2023-08-12 09:18:47 -07:00
2023-07-24 14:50:02 +02:00
2023-06-29 16:34:12 -07:00
2023-08-12 09:18:47 -07:00
2023-06-29 16:34:12 -07:00
2023-07-12 16:28:53 -07:00
2023-08-11 12:06:51 -07:00
2023-08-11 09:12:44 -07:00
2023-08-03 09:06:38 -07:00
2023-08-12 09:18:47 -07:00
2023-08-12 09:18:47 -07:00