Re: [Intel AlderLake] Read&Write files to FAT32 or UFS partition cause data corrupt due to P-Core&E-Core

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Sun, 20 Feb 2022 00:26:24 UTC
On 19.02.2022 13:23, Konstantin Belousov wrote:
> On Sat, Feb 19, 2022 at 12:14:16PM -0500, Alexander Motin wrote:
>> On 19.02.2022 12:02, Mike Karels wrote:
>>> On 18 Feb 2022, at 20:55, Tomoaki AOKI wrote:
>>>> Just a thought, but can it be the reason with timing (e.g., rendezvous
>>>> within (i)threads, hardware controlls without using hardware timer)
>>>> problem?
>>>>
>>>> On FreeBSD, IIUC, multi processor (multi core) implementation assumes
>>>> SMP (differs only clock speed) and end up with difference of
>>>> performance at same clock speed within P-core and E-core, possibly.
>>>
>>> Another possibility is that the system is confused by having hyperthreading
>>> on the P cores but not the E cores.
>>
>> No, I've tried to disable SMT and different number of cores to make it look
>> identical and uniform for the scheduler.  The only thing I could not test is
>> disabling all P cores to test only E, the motherboard does not allow that,
>> requiring at least one P core enabled.
> 
> Does the kernel select MWAIT as the idle method?  If you set idle to spin,
> is anything change?

By default kernel selects ACPI, using MWAIT:
machdep.idle: acpi
dev.cpu.0.cx_method: C1/mwait/hwc C2/mwait/hwc C3/mwait/hwc

I've tried to do in loader:
set machdep.idle_mwait=0
set machdep.idle="spin"  (also tried "hlt")
, but without visible positive effects.

-- 
Alexander Motin