linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] sample: bpf: introduce irqlat
@ 2022-04-14  9:07 Song Chen
  2022-04-14  9:47 ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Song Chen @ 2022-04-14  9:07 UTC (permalink / raw)
  To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, netdev, bpf, linux-kernel
  Cc: Song Chen

I'm planning to implement a couple of ebpf tools for preempt rt,
including irq latency, preempt latency and so on, how does it sound
to you?

Song Chen (1):
  sample: bpf: introduce irqlat

 samples/bpf/.gitignore    |   1 +
 samples/bpf/Makefile      |   5 ++
 samples/bpf/irqlat_kern.c |  81 ++++++++++++++++++++++++++++++
 samples/bpf/irqlat_user.c | 100 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 187 insertions(+)
 create mode 100644 samples/bpf/irqlat_kern.c
 create mode 100644 samples/bpf/irqlat_user.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/1] sample: bpf: introduce irqlat
  2022-04-14  9:07 [RFC PATCH 0/1] sample: bpf: introduce irqlat Song Chen
@ 2022-04-14  9:47 ` Daniel Borkmann
  2022-04-14 11:25   ` Song Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2022-04-14  9:47 UTC (permalink / raw)
  To: Song Chen, ast, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, netdev, bpf, linux-kernel

On 4/14/22 11:07 AM, Song Chen wrote:
> I'm planning to implement a couple of ebpf tools for preempt rt,
> including irq latency, preempt latency and so on, how does it sound
> to you?

Sounds great, thanks! Please add these tools for upstream inclusion either to bpftrace [0] or
bcc [1], then a wider range of users would be able to benefit from them as well as they are
also shipped as distro packages and generally more widely used compared to kernel samples.

Thanks Song!

   [0] https://github.com/iovisor/bpftrace/tree/master/tools
   [1] https://github.com/iovisor/bcc/tree/master/libbpf-tools

> Song Chen (1):
>    sample: bpf: introduce irqlat
> 
>   samples/bpf/.gitignore    |   1 +
>   samples/bpf/Makefile      |   5 ++
>   samples/bpf/irqlat_kern.c |  81 ++++++++++++++++++++++++++++++
>   samples/bpf/irqlat_user.c | 100 ++++++++++++++++++++++++++++++++++++++
>   4 files changed, 187 insertions(+)
>   create mode 100644 samples/bpf/irqlat_kern.c
>   create mode 100644 samples/bpf/irqlat_user.c
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/1] sample: bpf: introduce irqlat
  2022-04-14  9:47 ` Daniel Borkmann
@ 2022-04-14 11:25   ` Song Chen
  2022-04-14 15:32     ` Daniel Borkmann
  0 siblings, 1 reply; 5+ messages in thread
From: Song Chen @ 2022-04-14 11:25 UTC (permalink / raw)
  To: Daniel Borkmann, ast, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, netdev, bpf, linux-kernel

hi Daniel,

Thanks for liking the idea.

My target is embedded devices, that's why i get started from ebpf C.bcc 
and bpftrace is a good idea, but i prefer taking one thing at a time, 
what's more, i'm not familiar with python, it might take longer.

Once C code is accepted, i will move myself to bcc and bpftrace. Is it 
ok for you?

BR

Song


在 2022/4/14 17:47, Daniel Borkmann 写道:
> On 4/14/22 11:07 AM, Song Chen wrote:
>> I'm planning to implement a couple of ebpf tools for preempt rt,
>> including irq latency, preempt latency and so on, how does it sound
>> to you?
> 
> Sounds great, thanks! Please add these tools for upstream inclusion 
> either to bpftrace [0] or
> bcc [1], then a wider range of users would be able to benefit from them 
> as well as they are
> also shipped as distro packages and generally more widely used compared 
> to kernel samples.
> 
> Thanks Song!
> 
>    [0] https://github.com/iovisor/bpftrace/tree/master/tools
>    [1] https://github.com/iovisor/bcc/tree/master/libbpf-tools
> 
>> Song Chen (1):
>>    sample: bpf: introduce irqlat
>>
>>   samples/bpf/.gitignore    |   1 +
>>   samples/bpf/Makefile      |   5 ++
>>   samples/bpf/irqlat_kern.c |  81 ++++++++++++++++++++++++++++++
>>   samples/bpf/irqlat_user.c | 100 ++++++++++++++++++++++++++++++++++++++
>>   4 files changed, 187 insertions(+)
>>   create mode 100644 samples/bpf/irqlat_kern.c
>>   create mode 100644 samples/bpf/irqlat_user.c
>>
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/1] sample: bpf: introduce irqlat
  2022-04-14 11:25   ` Song Chen
@ 2022-04-14 15:32     ` Daniel Borkmann
  2022-04-15  1:58       ` Song Chen
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2022-04-14 15:32 UTC (permalink / raw)
  To: Song Chen
  Cc: ast, andrii, kafai, songliubraving, yhs, john.fastabend, kpsingh,
	netdev, bpf, linux-kernel, brendan.d.gregg

Hi Song,

On 4/14/22 1:25 PM, Song Chen wrote:
> hi Daniel,
> 
> Thanks for liking the idea.
> 
> My target is embedded devices, that's why i get started from ebpf C.bcc and bpftrace is a good idea, but i prefer taking one thing at a time, what's more, i'm not familiar with python, it might take longer.
> 
> Once C code is accepted, i will move myself to bcc and bpftrace. Is it ok for you?

The libbpf-based tools from the mentioned link in BCC are all C, not Python. Also bpftrace
has guidelines for building it more portably that would be suitable for embedded devices [2].
I'd presume these should still match your requirements?

Right now samples/bpf/ is a bit of a dumping ground of random things, some BPF samples better
maintained than others, but generally samples/bpf/ is a bit of a mess. BPF has a huge ecosystem
outside of kernel in its various areas it covers, so it has outgrown the few samples in there
long ago, and you'll find many resources on how to get started in the wild.

Adding this as a samples/bpf/ will have little value to others, since people may not be aware
of them, and if they are they need to manually build/ship it, etc. If you upstream and can improve
the tools in bpftrace/bcc as pointed out, then a lot more people will be able to consume them
and benefit from it, and you get the shipping via distros for free.

   [2] https://github.com/iovisor/bpftrace/blob/master/docs/embedded_builds.md

Thanks again,
Daniel

> BR
> 
> Song
> 
> 
> 在 2022/4/14 17:47, Daniel Borkmann 写道:
>> On 4/14/22 11:07 AM, Song Chen wrote:
>>> I'm planning to implement a couple of ebpf tools for preempt rt,
>>> including irq latency, preempt latency and so on, how does it sound
>>> to you?
>>
>> Sounds great, thanks! Please add these tools for upstream inclusion either to bpftrace [0] or
>> bcc [1], then a wider range of users would be able to benefit from them as well as they are
>> also shipped as distro packages and generally more widely used compared to kernel samples.
>>
>> Thanks Song!
>>
>>    [0] https://github.com/iovisor/bpftrace/tree/master/tools
>>    [1] https://github.com/iovisor/bcc/tree/master/libbpf-tools
>>
>>> Song Chen (1):
>>>    sample: bpf: introduce irqlat
>>>
>>>   samples/bpf/.gitignore    |   1 +
>>>   samples/bpf/Makefile      |   5 ++
>>>   samples/bpf/irqlat_kern.c |  81 ++++++++++++++++++++++++++++++
>>>   samples/bpf/irqlat_user.c | 100 ++++++++++++++++++++++++++++++++++++++
>>>   4 files changed, 187 insertions(+)
>>>   create mode 100644 samples/bpf/irqlat_kern.c
>>>   create mode 100644 samples/bpf/irqlat_user.c
>>>
>>
>>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [RFC PATCH 0/1] sample: bpf: introduce irqlat
  2022-04-14 15:32     ` Daniel Borkmann
@ 2022-04-15  1:58       ` Song Chen
  0 siblings, 0 replies; 5+ messages in thread
From: Song Chen @ 2022-04-15  1:58 UTC (permalink / raw)
  To: Daniel Borkmann
  Cc: ast, andrii, kafai, songliubraving, yhs, john.fastabend, kpsingh,
	netdev, bpf, linux-kernel, brendan.d.gregg

bcc and bpftrace should be able to match my requirement, I will look 
into them, many thanks.

BR

Song

在 2022/4/14 23:32, Daniel Borkmann 写道:
> Hi Song,
> 
> On 4/14/22 1:25 PM, Song Chen wrote:
>> hi Daniel,
>>
>> Thanks for liking the idea.
>>
>> My target is embedded devices, that's why i get started from ebpf 
>> C.bcc and bpftrace is a good idea, but i prefer taking one thing at a 
>> time, what's more, i'm not familiar with python, it might take longer.
>>
>> Once C code is accepted, i will move myself to bcc and bpftrace. Is it 
>> ok for you?
> 
> The libbpf-based tools from the mentioned link in BCC are all C, not 
> Python. Also bpftrace
> has guidelines for building it more portably that would be suitable for 
> embedded devices [2].
> I'd presume these should still match your requirements?
> 
> Right now samples/bpf/ is a bit of a dumping ground of random things, 
> some BPF samples better
> maintained than others, but generally samples/bpf/ is a bit of a mess. 
> BPF has a huge ecosystem
> outside of kernel in its various areas it covers, so it has outgrown the 
> few samples in there
> long ago, and you'll find many resources on how to get started in the wild.
> 
> Adding this as a samples/bpf/ will have little value to others, since 
> people may not be aware
> of them, and if they are they need to manually build/ship it, etc. If 
> you upstream and can improve
> the tools in bpftrace/bcc as pointed out, then a lot more people will be 
> able to consume them
> and benefit from it, and you get the shipping via distros for free.
> 
>    [2] 
> https://github.com/iovisor/bpftrace/blob/master/docs/embedded_builds.md
> 
> Thanks again,
> Daniel
> 
>> BR
>>
>> Song
>>
>>
>> 在 2022/4/14 17:47, Daniel Borkmann 写道:
>>> On 4/14/22 11:07 AM, Song Chen wrote:
>>>> I'm planning to implement a couple of ebpf tools for preempt rt,
>>>> including irq latency, preempt latency and so on, how does it sound
>>>> to you?
>>>
>>> Sounds great, thanks! Please add these tools for upstream inclusion 
>>> either to bpftrace [0] or
>>> bcc [1], then a wider range of users would be able to benefit from 
>>> them as well as they are
>>> also shipped as distro packages and generally more widely used 
>>> compared to kernel samples.
>>>
>>> Thanks Song!
>>>
>>>    [0] https://github.com/iovisor/bpftrace/tree/master/tools
>>>    [1] https://github.com/iovisor/bcc/tree/master/libbpf-tools
>>>
>>>> Song Chen (1):
>>>>    sample: bpf: introduce irqlat
>>>>
>>>>   samples/bpf/.gitignore    |   1 +
>>>>   samples/bpf/Makefile      |   5 ++
>>>>   samples/bpf/irqlat_kern.c |  81 ++++++++++++++++++++++++++++++
>>>>   samples/bpf/irqlat_user.c | 100 
>>>> ++++++++++++++++++++++++++++++++++++++
>>>>   4 files changed, 187 insertions(+)
>>>>   create mode 100644 samples/bpf/irqlat_kern.c
>>>>   create mode 100644 samples/bpf/irqlat_user.c
>>>>
>>>
>>>
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-15  1:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-14  9:07 [RFC PATCH 0/1] sample: bpf: introduce irqlat Song Chen
2022-04-14  9:47 ` Daniel Borkmann
2022-04-14 11:25   ` Song Chen
2022-04-14 15:32     ` Daniel Borkmann
2022-04-15  1:58       ` Song Chen

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).