public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "Turgis, Frederic" <f-turgis@ti.com>
To: Mark Wielaard <mjw@redhat.com>
Cc: "systemtap@sourceware.org" <systemtap@sourceware.org>
Subject: RE: Making the transport layer more robust
Date: Tue, 06 Sep 2011 14:30:00 -0000	[thread overview]
Message-ID: <13872098A06B02418CF379A158C0F1460163182C6D@dnce02.ent.ti.com> (raw)
In-Reply-To: <1315303931.3895.30.camel@springer.wildebeest.org>

Hi,

>Indeed. That is the first pass, if there is anything to read,
>we read it, but then (if select is supported) we call select()
>on the control_channel

Mmmmh, we are probably not talking about the same thing ;-) I was stating "before changes/after changes" in 1st mail to mention introduction of select() in the code. In fact I was doing a comparison between v1.3 and latest mainline.
To explain my point, I then re-explained the "before changes" but did not emphasize it was the case. And in "before changes", code states: "The runtime does not implement select() on the command filehandle"

No select() means kernel polling is useless thanks to userspace polling. But that is old story !


>Yeah, you are right, that second bit is a little strange, we
>kind of depend on user space always calling us with
>O_NONBLOCK. But if it doesn't, then at least we do something
>somewhat sensible.

In the past, I had wondered if userspace could not make a blocking read to remove userspace polling. But now we have select() so we could probably remove any (dead) code related to blocking read.


>> Control channel userpace polling (well, I consider control
>everything that is not trace/data output from script)
>> -      usleep (250*1000); /* sleep 250ms between polls */
>> +      usleep (2000*1000); /* sleep 250ms between polls */
>
>So with current git trunk, you get pselect support, so don't
>need to tweak this anymore.

Aligned

>yeah, that is somewhat extreme, if possible try just
>-DSTP_WORK_TIMER=... to get a good balance. I am interested in
>what value works well for you.

Acceptable on v1.3 ;-)
On v1.5, we kept polling and went for 1s and it seemed to work well. This is giving latency I imagine but 1s is not annoying for us. I had to stop testing to have board repaired.

>
>> Data channel userspace timeout of select()
>> -       struct timespec tim = {.tv_sec=0,
>.tv_nsec=200000000}, *timeout = &tim;
>> +       struct timespec tim = {.tv_sec=5, .tv_nsec=0}, *timeout =
>> + &tim;
>
>With bulk mode this shouldn't be necessary. But it might be
>nice to make this tunable too with some -D option.

The key point here and above is that we can use -D as anyone has to recompile kernel module. This would be the customization we are looking for (slow polling for PM cases, fast polling for cases with lot of trace).
Userspace would need to be frozen (thanks to select()/ppoll()) as we want to deliver it pre-compiled to other developers. So -D would not really help.
What is the rationale behind 200ms timeout ? Bulkmode code explains that there is a potential race condition but then sets a timeout of 10s.

Well, we are close to close on these Power Management topics, great...

Regards
Fred

Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 753.920



  reply	other threads:[~2011-09-06 14:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19  8:59 Mark Wielaard
2011-07-19 11:42 ` Mark Wielaard
2011-07-19 15:03 ` Mark Wielaard
2011-07-20  8:29   ` Mark Wielaard
2011-07-19 15:05 ` William Cohen
2011-07-20 14:13 ` Mark Wielaard
2011-07-21 17:18 ` David Smith
2011-08-12 17:43 ` Mark Wielaard
2011-08-15  8:24   ` Mark Wielaard
2011-08-15 18:30   ` Josh Stone
2011-08-16 13:23     ` Mark Wielaard
2011-08-25 12:12       ` Turgis, Frederic
2011-08-26 15:45         ` Turgis, Frederic
2011-08-26 18:45           ` Frank Ch. Eigler
2011-08-29  8:32             ` Turgis, Frederic
2011-08-29 11:21               ` Frank Ch. Eigler
2011-08-29 14:46               ` Frank Ch. Eigler
2011-08-30 13:20                 ` Turgis, Frederic
2011-09-05 11:27         ` Mark Wielaard
2011-09-05 14:32           ` Turgis, Frederic
     [not found]           ` <13872098A06B02418CF379A158C0F1460163182604@dnce02.ent.ti.com>
2011-09-06 10:12             ` Mark Wielaard
2011-09-06 14:30               ` Turgis, Frederic [this message]
2011-09-06 14:37               ` David Smith
2011-09-06 15:37                 ` David Smith
2011-09-06 16:25                   ` Turgis, Frederic

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=13872098A06B02418CF379A158C0F1460163182C6D@dnce02.ent.ti.com \
    --to=f-turgis@ti.com \
    --cc=mjw@redhat.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).