From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349AbeAPRfG (ORCPT + 1 other); Tue, 16 Jan 2018 12:35:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbeAPRfF (ORCPT ); Tue, 16 Jan 2018 12:35:05 -0500 Subject: Re: [PATCH 06/16] x86/mm/ldt: Reserve high address-space range for the LDT To: Peter Zijlstra , Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , jroedel@suse.de References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-7-git-send-email-joro@8bytes.org> <20180116165213.GF2228@hirez.programming.kicks-ass.net> <20180116171343.GB28161@8bytes.org> <20180116173115.GG2228@hirez.programming.kicks-ass.net> From: Waiman Long Organization: Red Hat Message-ID: <13a45e59-5969-2fdb-25cd-adcd5298784b@redhat.com> Date: Tue, 16 Jan 2018 12:34:36 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180116173115.GG2228@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 16 Jan 2018 17:34:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/16/2018 12:31 PM, Peter Zijlstra wrote: > On Tue, Jan 16, 2018 at 06:13:43PM +0100, Joerg Roedel wrote: >> Hi Peter, >> >> On Tue, Jan 16, 2018 at 05:52:13PM +0100, Peter Zijlstra wrote: >>> On Tue, Jan 16, 2018 at 05:36:49PM +0100, Joerg Roedel wrote: >>>> From: Joerg Roedel >>>> >>>> Reserve 2MB/4MB of address space for mapping the LDT to >>>> user-space. >>> LDT is 64k, we need 2 per CPU, and NR_CPUS <= 64 on 32bit, that gives >>> 64K*2*64=8M > 2M. >> Thanks, I'll fix that in the next version. > Just lower the max SMP setting until it fits or something. 32bit is too > address space starved for lots of CPU in any case, 64 CPUs on 32bit is > absolutely insane. Maybe we can just scale the amount of reserved space according to the current NR_CPUS setting. In this way, we won't waste more memory than is necessary. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f72.google.com (mail-oi0-f72.google.com [209.85.218.72]) by kanga.kvack.org (Postfix) with ESMTP id 7953E6B026B for ; Tue, 16 Jan 2018 12:35:01 -0500 (EST) Received: by mail-oi0-f72.google.com with SMTP id f71so6721998oib.6 for ; Tue, 16 Jan 2018 09:35:01 -0800 (PST) Received: from mx1.redhat.com (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id d71si1098453oic.259.2018.01.16.09.35.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Jan 2018 09:35:00 -0800 (PST) Subject: Re: [PATCH 06/16] x86/mm/ldt: Reserve high address-space range for the LDT References: <1516120619-1159-1-git-send-email-joro@8bytes.org> <1516120619-1159-7-git-send-email-joro@8bytes.org> <20180116165213.GF2228@hirez.programming.kicks-ass.net> <20180116171343.GB28161@8bytes.org> <20180116173115.GG2228@hirez.programming.kicks-ass.net> From: Waiman Long Message-ID: <13a45e59-5969-2fdb-25cd-adcd5298784b@redhat.com> Date: Tue, 16 Jan 2018 12:34:36 -0500 MIME-Version: 1.0 In-Reply-To: <20180116173115.GG2228@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: owner-linux-mm@kvack.org List-ID: To: Peter Zijlstra , Joerg Roedel Cc: Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Linus Torvalds , Andy Lutomirski , Dave Hansen , Josh Poimboeuf , Juergen Gross , Borislav Petkov , Jiri Kosina , Boris Ostrovsky , Brian Gerst , David Laight , Denys Vlasenko , Eduardo Valentin , Greg KH , Will Deacon , aliguori@amazon.com, daniel.gruss@iaik.tugraz.at, hughd@google.com, keescook@google.com, Andrea Arcangeli , Waiman Long , jroedel@suse.de On 01/16/2018 12:31 PM, Peter Zijlstra wrote: > On Tue, Jan 16, 2018 at 06:13:43PM +0100, Joerg Roedel wrote: >> Hi Peter, >> >> On Tue, Jan 16, 2018 at 05:52:13PM +0100, Peter Zijlstra wrote: >>> On Tue, Jan 16, 2018 at 05:36:49PM +0100, Joerg Roedel wrote: >>>> From: Joerg Roedel >>>> >>>> Reserve 2MB/4MB of address space for mapping the LDT to >>>> user-space. >>> LDT is 64k, we need 2 per CPU, and NR_CPUS <= 64 on 32bit, that gives >>> 64K*2*64=8M > 2M. >> Thanks, I'll fix that in the next version. > Just lower the max SMP setting until it fits or something. 32bit is too > address space starved for lots of CPU in any case, 64 CPUs on 32bit is > absolutely insane. Maybe we can just scale the amount of reserved space according to the current NR_CPUS setting. In this way, we won't waste more memory than is necessary. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org