lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 18 Jan 2009 13:16:33 -0500
From:	Brian Gerst <brgerst@...il.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	mingo@...e.hu, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 03/12] x86-64: Convert irqstacks to per-cpu

On Sun, Jan 18, 2009 at 11:39 AM, Tejun Heo <tj@...nel.org> wrote:
> From: Brian Gerst <brgerst@...il.com>
>
> Move the irqstackptr variable from the PDA to per-cpu.  Make the
> stacks themselves per-cpu, removing some specific allocation code.
> Add a seperate flag (is_boot_cpu) to simplify the per-cpu boot
> adjustments.
>
> tj: * sprinkle some underbars around.
>
>    * irq_stack_ptr is not used till traps_init(), no reason to
>      initialize it early.  On SMP, just leaving it NULL till proper
>      initialization in setup_per_cpu_areas() works.  Dropped
>      is_boot_cpu and early irq_stack_ptr initialization.

And it adds more #ifdefs.  All these conditional initializations on
CONFIG_SMP are really cluttering up the code.  It also conflicts with
one of my goals with these patches: have as much state as possible
already prepared when a cpu boots.  For the boot cpu this means static
initialization.  For secondary cpus, that means setting up the values
in setup_per_cpu_areas().  This eliminates any window where the state
isn't ready yet, as you've already seen with per_cpu_offset.

And is_boot_cpu was a worthwhile optimization on its own.  I had plans
on using it in more places later.

--
Brian Gerst
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ