Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1627604

Re: [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit

Path csiph.com!1.us.feeder.erje.net!feeder.erje.net!2.eu.feeder.erje.net!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Vitaly Kuznetsov <vkuznets@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit
Date Thu, 20 Apr 2017 17:50:01 +0200
Message-ID <tymvf-2j8-7@gated-at.bofh.it> (permalink)
References <tykjM-11j-19@gated-at.bofh.it> <tylSy-26m-21@gated-at.bofh.it>
X-Original-To Peter Zijlstra <peterz@infradead.org>
Dmarc-Filter OpenDMARC Filter v1.3.2 mx1.redhat.com 7853267EBB
Authentication-Results ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=vkuznets@redhat.com
Dkim-Filter OpenDKIM Filter v2.11.0 mx1.redhat.com 7853267EBB
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
MIME-Version 1.0
Content-Type text/plain
X-Scanned-By MIMEDefang 2.79 on 10.5.11.11
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 20 Apr 2017 15:40:46 +0000 (UTC)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 36
Organization linux.* mail to news gateway
X-Original-Cc x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@suse.de>, Prarit Bhargava <prarit@redhat.com>, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
X-Original-Date Thu, 20 Apr 2017 17:40:37 +0200
X-Original-Message-ID <87fuh3xf2i.fsf@vitty.brq.redhat.com>
X-Original-References <20170420132453.19652-1-vkuznets@redhat.com> <20170420150615.ns3343rokvmc3kjt@hirez.programming.kicks-ass.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1627604

Show key headers only | View raw


Peter Zijlstra <peterz@infradead.org> writes:

> On Thu, Apr 20, 2017 at 03:24:53PM +0200, Vitaly Kuznetsov wrote:
>> In this patch I suggest we set __max_logical_packages based on the
>> max_physical_pkg_id and total_cpus,
>
> So my 4 socket 144 CPU system will then get max_physical_pkg_id=144,
> instead of 4.
>
> This wastes quite a bit of memory for the per-node arrays. Luckily most
> are just pointer arrays, but still, wasting 140*8 bytes for each of
> them.
>
>> this should be safe and cover all
>> possible cases. Alternatively, we may think about eliminating the concept
>> of __max_logical_packages completely and relying on max_physical_pkg_id/
>> total_cpus where we currently use topology_max_packages().
>> 
>> The issue could've been solved in Xen too I guess. CPUID returning
>> x86_max_cores can be tweaked to be the lowerest(?) possible number of
>> all logical packages of the guest.
>
> This is getting ludicrous. Xen is plain broken, and instead of fixing
> it, you propose to somehow deal with its obviously crack induced
> behaviour :-(

Totally agree and I don't like the solution I propose (and that's why
this is RFC)... The problem is that there are such Xen setups in the
wild and with the recent changes some guests will BUG() :-(

Alternatively, we can just remove the BUG() and do something with CPUs
which have their pkg >= __max_logical_packages, e.g. assign them to the
last package. Far from ideal but will help to avoid the regression.

-- 
  Vitaly

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-20 15:30 +0200
  Re: [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit Peter Zijlstra <peterz@infradead.org> - 2017-04-20 17:10 +0200
    Re: [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-20 17:50 +0200
      Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer  __max_logical_packages limit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-04-20 18:10 +0200
        Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit Vitaly Kuznetsov <vkuznets@redhat.com> - 2017-04-20 18:30 +0200
      Re: [PATCH RFC] x86/smpboot: Set safer __max_logical_packages limit Peter Zijlstra <peterz@infradead.org> - 2017-04-20 18:20 +0200
        Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer  __max_logical_packages limit Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-04-20 19:20 +0200
    Re: [Xen-devel] [PATCH RFC] x86/smpboot: Set safer  __max_logical_packages limit Andrew Cooper <andrew.cooper3@citrix.com> - 2017-04-20 19:10 +0200

csiph-web