[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVPK+1yKbOs2A73413bamssyNXFEq+j9LTs_vZxfTsxzGA@mail.gmail.com>
Date: Wed, 13 Jan 2016 11:17:23 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Martin KaFai Lau <kafai@...com>
Cc: Alexei Starovoitov <alexei.starovoitov@...il.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Network Development <netdev@...r.kernel.org>,
Daniel Borkmann <daniel@...earbox.net>
Subject: Re: [PATCH 5/9] bpf: syscall: add percpu version of lookup/update elem
On Wed, Jan 13, 2016 at 10:22 AM, Martin KaFai Lau <kafai@...com> wrote:
> On Wed, Jan 13, 2016 at 08:38:18AM +0800, Ming Lei wrote:
>> > The userspace usually only aggregates value across all cpu every X seconds.
>>
>> That is just in your case, and Alexei worried the issue of data stale.
> I believe we are talking about validity of a value. How to
> make use of a less-stale but invalid data?
About the 'invalidity' thing, it should be same between using
smp_call(run in IPI irq handler) and simple memcpy().
When smp_call_function_single() is used to request to lookup element in
the specific CPU, the value of the element may be in updating in that CPU
and not completed yet in eBPF prog, then IPI comes and half updated
data is still returned to syscall.
Thanks,
Ming Lei
Powered by blists - more mailing lists