public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: David Smith <dsmith@redhat.com>
To: yzhu1 <Yanjun.Zhu@windriver.com>,
	sshukla@mvista.com,        systemtap@sourceware.org
Subject: Re: [PATCH 1/1] stp: rt: replace spin_lock with stp style lock and use STP_ALLOC_FLAGS
Date: Wed, 18 Nov 2015 17:14:00 -0000	[thread overview]
Message-ID: <564CB1DE.5040708@redhat.com> (raw)
In-Reply-To: <564C337B.7060306@windriver.com>

On 11/18/2015 02:14 AM, yzhu1 wrote:
> Hi, David
> 
> Thanks for your comments.
> 
> I can not reproduce this problem. And my user can reproduce this problem
> ocassionly.
> And I requested him to help me to make tests about your changes. But he
> refused.
> 
> So I made auto tests in systemtap after this patch is applied. And I can
> not find any
> regressions about this patch.

Most of the time you won't see any difference when using STP_ALLOC_FLAGS
in place of STP_ALLOC_SLEEP_FLAGS. You would see a difference if your
system is under memory pressure.

Let me refresh everyone's knowledge of the difference between
STP_ALLOC_FLAGS and STP_ALLOC_SLEEP_FLAGS. When using STP_ALLOC_FLAGS,
if memory isn't available, the allocation will fail. When using
STP_ALLOC_SLEEP_FLAGS, the kernel will try to wait until memory is
available. Obviously, we can only use STP_ALLOC_SLEEP_FLAGS in certain
places in the code where sleeping is permitted.

If changing STP_ALLOC_SLEEP_FLAGS to STP_ALLOC_FLAGS makes a difference,
this really means that we're using STP_ALLOC_SLEEP_FLAGS in a place
where it isn't safe to sleep.

It could be that in the normal kernel it is safe to sleep in a spot
where we're using STP_ALLOC_SLEEP_FLAGS, but in the realtime kernel it
isn't safe to sleep at that same spot. I guess it also makes sense to
sleep as little as possible when running systemtap on the realtime kernel.

So, I'll withdraw my objection. As long as the switch from
STP_ALLOC_SLEEP_FLAGS to STP_ALLOC_FLAGS only affects the realtime
kernel, I'm OK with it.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)

  reply	other threads:[~2015-11-18 17:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17  8:09 stp: rt: replace spin_lock with stp style lock and use yzhu1
2015-11-17  8:09 ` [PATCH 1/1] stp: rt: replace spin_lock with stp style lock and use STP_ALLOC_FLAGS yzhu1
2015-11-17 16:45   ` David Smith
2015-11-18  8:14     ` yzhu1
2015-11-18 17:14       ` David Smith [this message]
2015-11-19  7:53         ` yzhu1
  -- strict thread matches above, loose matches on Subject: below --
2015-10-22  7:45 Zhu Yanjun
2015-10-22  7:53 ` yzhu1
2015-10-23  4:04   ` Santosh Shukla
2015-10-26  7:03     ` yzhu1
2015-10-26  8:25       ` yzhu1
2015-10-26  8:43         ` Santosh Shukla
2015-11-17  7:38     ` yzhu1
2015-11-17  7:52       ` Santosh Shukla
2015-10-22 16:34 ` David Smith
2015-10-26  3:19   ` yzhu1
2015-10-26 21:28     ` David Smith
2015-10-27 13:52       ` Frank Ch. Eigler
2015-10-28  2:30       ` yzhu1
2015-10-28 17:09         ` David Smith

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=564CB1DE.5040708@redhat.com \
    --to=dsmith@redhat.com \
    --cc=Yanjun.Zhu@windriver.com \
    --cc=sshukla@mvista.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).