Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756076AbbESPFM (ORCPT ); Tue, 19 May 2015 11:05:12 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38488 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756043AbbESPFG (ORCPT ); Tue, 19 May 2015 11:05:06 -0400 Message-ID: <555B5105.4040808@zytor.com> Date: Tue, 19 May 2015 08:04:37 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Andy Lutomirski , Ingo Molnar CC: Borislav Petkov , Gu Zheng , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH] x86, espfix: use spin_lock rather than mutex References: <1431603465-12610-1-git-send-email-guz.fnst@cn.fujitsu.com> <20150514122621.GB29235@pd.tnic> <20150514182954.GB23479@gmail.com> <20150514212753.GE29125@pd.tnic> <55551E07.8080509@zytor.com> <20150515065417.GB29973@gmail.com> <55559FDA.3010205@zytor.com> <555A40C9.6010605@kernel.org> In-Reply-To: <555A40C9.6010605@kernel.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1000 Lines: 29 On 05/18/2015 12:43 PM, Andy Lutomirski wrote: > On 05/15/2015 12:27 AM, H. Peter Anvin wrote: >> On 05/14/2015 11:54 PM, Ingo Molnar wrote: >>> >>> The only slightly subtle detail with that is to use alloc_pages_node() >>> with the secondary CPU's node, to make sure the espfix stack is >>> NUMA-local to the CPU that is going to use it. >>> >> >> It doesn't hurt, although it isn't super critical as each page will be >> shared among 64 CPUs. The whole espfix stack is only a single cacheline >> long. >> > > I don't think we actually need these pages allocated until we try to run > user code. Can we move this very late in initialization instead? > Yes, we could, as long as it is run on each CPU before that CPU tries to run user code. -hpa -- 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/