public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/22312] New: bpf: global variable locking
@ 2017-10-18 21:45 amerey at redhat dot com
  2017-10-20 22:22 ` [Bug translator/22312] " amerey at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: amerey at redhat dot com @ 2017-10-18 21:45 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

            Bug ID: 22312
           Summary: bpf: global variable locking
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: amerey at redhat dot com
  Target Milestone: ---

May need an explicit bpf array for lock tracking.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug translator/22312] bpf: global variable locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
@ 2017-10-20 22:22 ` amerey at redhat dot com
  2018-07-12 19:57 ` me at serhei dot io
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: amerey at redhat dot com @ 2017-10-20 22:22 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

--- Comment #1 from Aaron Merey <amerey at redhat dot com> ---
We want to implement stap's locking of globals on a per-probe basis.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug translator/22312] bpf: global variable locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
  2017-10-20 22:22 ` [Bug translator/22312] " amerey at redhat dot com
@ 2018-07-12 19:57 ` me at serhei dot io
  2018-08-09 14:35 ` [Bug bpf/22312] " me at serhei dot io
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2018-07-12 19:57 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at serhei dot io

--- Comment #2 from Serhei Makarov <me at serhei dot io> ---
https://sourceware.org/ml/systemtap/2018-q3/msg00017.html describes one
possible way of doing this:

BPF_XADD(&lock_counter, 1);
value = read(lock_counter);
if (value <= 1) { ... execute probe ... } else skip probe
BPF_XADD(&lock_counter, -1);

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
  2017-10-20 22:22 ` [Bug translator/22312] " amerey at redhat dot com
  2018-07-12 19:57 ` me at serhei dot io
@ 2018-08-09 14:35 ` me at serhei dot io
  2019-04-08 16:14 ` [Bug bpf/22312] bpf: global variable and statistics aggregate locking me at serhei dot io
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2018-08-09 14:35 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|translator                  |bpf

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable and statistics aggregate locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
                   ` (2 preceding siblings ...)
  2018-08-09 14:35 ` [Bug bpf/22312] " me at serhei dot io
@ 2019-04-08 16:14 ` me at serhei dot io
  2019-04-12 17:41 ` me at serhei dot io
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2019-04-08 16:14 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|bpf: global variable        |bpf: global variable and
                   |locking                     |statistics aggregate
                   |                            |locking

--- Comment #3 from Serhei Makarov <me at serhei dot io> ---
Becomes especially important if we want to get exact results from statistical
aggregates (PR23476). There is some BPF upstream work (discussed at LPC 2018)
that will eventually make this easier to implement properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable and statistics aggregate locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
                   ` (3 preceding siblings ...)
  2019-04-08 16:14 ` [Bug bpf/22312] bpf: global variable and statistics aggregate locking me at serhei dot io
@ 2019-04-12 17:41 ` me at serhei dot io
  2019-05-06 17:04 ` me at serhei dot io
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2019-04-12 17:41 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

--- Comment #4 from Serhei Makarov <me at serhei dot io> ---
Newer kernels will include a spinlock primitive:
https://github.com/torvalds/linux/blob/master/include/uapi/linux/bpf.h#L2346

On older kernels we may either use the XADD method or just print a warning and
skip locking altogether.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable and statistics aggregate locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
                   ` (4 preceding siblings ...)
  2019-04-12 17:41 ` me at serhei dot io
@ 2019-05-06 17:04 ` me at serhei dot io
  2019-06-26 19:40 ` me at serhei dot io
  2019-06-26 20:29 ` me at serhei dot io
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2019-05-06 17:04 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

Serhei Makarov <me at serhei dot io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |24528


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=24528
[Bug 24528] bpf-next housekeeping: bpf-translate.cxx should distinguish codegen
for kernel/userspace targets
-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable and statistics aggregate locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
                   ` (5 preceding siblings ...)
  2019-05-06 17:04 ` me at serhei dot io
@ 2019-06-26 19:40 ` me at serhei dot io
  2019-06-26 20:29 ` me at serhei dot io
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2019-06-26 19:40 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312

--- Comment #5 from Serhei Makarov <me at serhei dot io> ---
If we go with the 'print a warning' method, should only print if the script is
using some feature that's particularly sensitive to locking. Currently the
@variance calculation looks to be a candidate for that.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

* [Bug bpf/22312] bpf: global variable and statistics aggregate locking
  2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
                   ` (6 preceding siblings ...)
  2019-06-26 19:40 ` me at serhei dot io
@ 2019-06-26 20:29 ` me at serhei dot io
  7 siblings, 0 replies; 9+ messages in thread
From: me at serhei dot io @ 2019-06-26 20:29 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=22312
Bug 22312 depends on bug 24528, which changed state.

Bug 24528 Summary: stapbpf-next housekeeping: bpf-translate.cxx should distinguish codegen for kernel/userspace targets
https://sourceware.org/bugzilla/show_bug.cgi?id=24528

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

end of thread, other threads:[~2019-06-26 20:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-18 21:45 [Bug translator/22312] New: bpf: global variable locking amerey at redhat dot com
2017-10-20 22:22 ` [Bug translator/22312] " amerey at redhat dot com
2018-07-12 19:57 ` me at serhei dot io
2018-08-09 14:35 ` [Bug bpf/22312] " me at serhei dot io
2019-04-08 16:14 ` [Bug bpf/22312] bpf: global variable and statistics aggregate locking me at serhei dot io
2019-04-12 17:41 ` me at serhei dot io
2019-05-06 17:04 ` me at serhei dot io
2019-06-26 19:40 ` me at serhei dot io
2019-06-26 20:29 ` me at serhei dot io

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 read-only IMAP folder(s) and NNTP newsgroup(s).