public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: fche@redhat.com (Frank Ch. Eigler)
To: Kun <mingkunone@qq.com>, "Arkady" <arkady.miasnikov@gmail.com>,
	craig@2ndquadrant.com
Cc: systemtap@sourceware.org
Subject: Re: Fwd: systemtap global var lead to high cpu
Date: Tue, 18 Aug 2020 15:11:16 -0400	[thread overview]
Message-ID: <871rk3wyzv.fsf@redhat.com> (raw)
In-Reply-To: <tencent_43E6EEC6C8B4F3E539910550E6DCE4AA2309@qq.com> (Kun via Systemtap's message of "Sat, 25 Jul 2020 10:45:02 +0800")


Hi -

Improvements made for PR26296 should dramatically improve
your global variable locking issues with systemtap.  Please
let us know if it's enough!

https://sourceware.org/git/?p=systemtap.git;a=commit;h=25012d82e181afe7de5cb8bcc2cefcef0b123e32

- FChE

------------------------------------------------------------------------

PR26296: lock pushdown optimization

Implements an algorithm to push lock/unlock operations downward in the
syntax tree, to just enclose the smallest possible region that deals
with global variables.  This means two common patterns run with much
more concurrency than before:

global a
probe foo {
  if (condition)
     { a++ }
  else
     { something_else() }
}

will only lock globals -if- the condition is true, so something_else()
would run unlocked.  Also:

global a
probe foo {
  if (a)
    { long_twisty_operation(); }
}

will unlock globals right after the condition is evaluated, so
long_twisty runs unlocked.  Previous behaviour is avilable with
--compatible=4.3.  New test case lock-pushdown.stp asserts locking
conditions throughout various relevant constructs.


  parent reply	other threads:[~2020-08-18 19:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24  2:00 Kun
2020-07-24  3:49 ` Arkady
2020-07-25  2:45   ` Kun
2020-07-25  5:25     ` Arkady
2020-08-18 19:11     ` Frank Ch. Eigler [this message]
     [not found] <tencent_FB0905D58DA3FA7F0E728C535B447E0D1905@qq.com>
2020-07-23 14:22 ` Serhei Makarov

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=871rk3wyzv.fsf@redhat.com \
    --to=fche@redhat.com \
    --cc=arkady.miasnikov@gmail.com \
    --cc=craig@2ndquadrant.com \
    --cc=mingkunone@qq.com \
    --cc=systemtap@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).