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]
Message-ID: <20160922121039.l6lnhb53os2af27x@pd.tnic>
Date:   Thu, 22 Sep 2016 14:10:39 +0200
From:   Borislav Petkov <bp@...e.de>
To:     Prarit Bhargava <prarit@...hat.com>
Cc:     linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Len Brown <len.brown@...el.com>,
        Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
        Juergen Gross <jgross@...e.com>
Subject: Re: [PATCH 0/2 v3] cpu hotplug: Preserve topology directory after
 soft remove event

On Thu, Sep 22, 2016 at 07:59:08AM -0400, Prarit Bhargava wrote:
> System boots with (usually) with 2 threads/core.  Some performance users want
> one thread per core.  Since there is no "noht" option anymore, users use /sys to
> disable a thread on each core.

I see.

> core_siblings and thread_siblings are the online thread's sibling cores and
> threads that are available to the scheduler

Hmm, I see something else:

<Documentation/cputopology.txt>:
7) /sys/devices/system/cpu/cpuX/topology/core_siblings:

        internal kernel map of cpuX's hardware threads within the same
        physical_package_id.

> and should be 0 when the thread is offline. That comes directly from
> reading the code.

But then code which reads those will have to *know* that those cores are
offline - otherwise it would be confused by what it is reading there.

For example, the core siblings of an offlined core are still the same,
they don't change. It is just the core that is offline.

> See commit 20102ac5bee3 ("cpupower: cpupower monitor reports uninitialized
> values for offline cpus").  That patch papers over the bug of not being able to
> find core_id and physical_package_id for an offline thread.

Right, and this is *exactly* the *right* thing to do - tools should
handle the case gracefully when cores are offline.

And we already state that explicitly in /sys/devices/system/cpu/online.

And for offlined cores they should show exactly that - cores
are offlined and either say that the measurement is going to be
wrong/innacurate or if they're showing per-core info, they don't show it
for the offlined cores or show special symbols like stars and whatnot.

So far I still see no need for changing anything in the kernel.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ