[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALDO+SZ-xwTEvg5wW1izuc4ze+zXke4Lcbqrph6kUFumd0BPdw@mail.gmail.com>
Date: Wed, 24 Aug 2016 16:46:20 -0700
From: William Tu <u9012063@...il.com>
To: Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: Daniel Borkmann <daniel@...earbox.net>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: [PATCH] bpf: fix size of copy_to_user in percpu map.
Hi,
I've tested on kvm and encountered similar issue. If I boot up VM with
CPU hotplug enabled like below:
./qemu-system-x86_64 -smp 2, maxcpus=4 <other boot parameters>
then the ' /sys/devices/system/cpu/possible' does not equal to the
number of cpu* dirs in ' /sys/devices/system/cpu/', which will crash
the percpu map testcase. Should we consider fix it, or for simply
workaround, we could disable CONFIG_HOTPLUG_CPU?
Thanks
William
On Thu, Aug 18, 2016 at 6:38 PM, William Tu <u9012063@...il.com> wrote:
> Hi Alexei and Daniel,
>
> I got feedback from Fusion bios/chipset team. In short, the value
> 'possible' includes empty CPU socket. To verify, I tested on a
> physical Xeon machine with 2 CPU sockets, one of them is empty. I got
> 'possible' = 0-239, the number of 'cpu*' =12. As a result, extra bytes
> are copied from kernel to userspace.
>
> As for Fusion, there is a configuration in *.vmx. If we disable cpu
> hot plug by "vcpu.hotadd=FALSE", then 'possible' == the number of
> 'cpu*' dirs, which is the configuration in ESX. If "vcpu.hotadd=TURE",
> then 'possible' is larger than 'cpu*' dirs, allowing users to add more
> vcpus.
>
> Regards,
> William
>
>
> On Fri, Aug 12, 2016 at 4:08 PM, Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
>> On Fri, Aug 12, 2016 at 09:58:51AM -0700, William Tu wrote:
>>> Hi,
>>>
>>> I've tested on ESXi version 5.5 and it seems OK.
>>> - VM1: Ubuntu 14.04, kernel 3.19 ---> OK 3 cpu dirs, possible = 0-2
>>> - VM2: Centos7, kernel 3.10 ---> OK 8 cpu dirs, possible = 0-7
>>>
>>> I tried another MacBook with Fusion, same issue happens, the cpu[0-9]
>>> dirs are not equal to /sys/devices/system/cpu/possible
>>
>> great. thanks for testing. I think the issue is closed and
>> hopefully you can follow up with fusion guys ;)
>>
Powered by blists - more mailing lists