netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: William Tu <u9012063@gmail.com>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH] bpf: fix size of copy_to_user in percpu map.
Date: Thu, 18 Aug 2016 18:38:20 -0700	[thread overview]
Message-ID: <CALDO+Sa6P-Qo5OqJELcak2nUKMAwdMuAxrDKASCJ_oJRPFsKjQ@mail.gmail.com> (raw)
In-Reply-To: <20160812230810.GB48651@ast-mbp.thefacebook.com>

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@gmail.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 ;)
>

  reply	other threads:[~2016-08-19  1:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  0:42 [PATCH] bpf: fix size of copy_to_user in percpu map William Tu
2016-07-29  6:47 ` Alexei Starovoitov
2016-07-29  7:54   ` Daniel Borkmann
2016-07-29 20:03     ` William Tu
2016-07-30  0:19       ` Daniel Borkmann
2016-07-30  5:23         ` William Tu
2016-07-30  5:34           ` Alexei Starovoitov
2016-07-31 15:25             ` William Tu
2016-08-01 16:07               ` Alexei Starovoitov
2016-08-01 16:30                 ` William Tu
2016-08-12 16:58                   ` William Tu
2016-08-12 23:08                     ` Alexei Starovoitov
2016-08-19  1:38                       ` William Tu [this message]
2016-08-24 23:46                         ` William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALDO+Sa6P-Qo5OqJELcak2nUKMAwdMuAxrDKASCJ_oJRPFsKjQ@mail.gmail.com \
    --to=u9012063@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).