xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xen.org>
Subject: Re: ns16550.c's poll_port variable
Date: Fri, 04 May 2012 10:40:28 +0100	[thread overview]
Message-ID: <CBC9629C.324E3%keir.xen@gmail.com> (raw)
In-Reply-To: <4FA3B9B602000078000818E5@nat28.tlf.novell.com>

On 04/05/2012 10:12, "Jan Beulich" <JBeulich@suse.com> wrote:

>>>> On 04.05.12 at 10:25, Keir Fraser <keir.xen@gmail.com> wrote:
>> On 04/05/2012 09:18, "Jan Beulich" <JBeulich@suse.com> wrote:
>>> does this really need to be a per-CPU variable? Can't a timer run only
>>> once at a time on the entire system (the more that it gets re-armed only
>>> at the end of the poll function, whereas the variable is consumed at the
>>> start), and hence the variable can be a simple one? Or else, what
>>> subtlety am I overlooking?
>> 
>> We set up a timer per initialised uart. There can be more than one (although
>> granted it is rare).
> 
> Is that actually useful? console.c can't really use more than one at a
> time (for there being a single sercon_handle), so perhaps it would be
> a good thing to avoid the setup for those that aren't actively used,
> e.g. by not calling ->init_postirq() for other than the used one?
> 
> Oh, wait, with crash_debug there can be a second call to
> serial_parse_handle(), so in that case serial console and gdb stub
> may run through different ports. With crash_debug off by default,
> wouldn't it make sense to optimize for that common case, so that
> specifying both "com1=" and "com2=" on the command line wouldn't
> needlessly consume resources (as serial_parse_handle() can easily
> tag which ports it got called for)? Or would you rather take the
> position of expecting people to remove unnecessary command line
> options, or live with them having side effects?

I'm unclear on exactly what you want to optimise away? Certainly the 8 bytes
per CPU of the poll_port variable isn't worth much optimising effort.

 -- Keir

> Jan
> 

  reply	other threads:[~2012-05-04  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04  8:18 ns16550.c's poll_port variable Jan Beulich
2012-05-04  8:25 ` Keir Fraser
2012-05-04  9:12   ` Jan Beulich
2012-05-04  9:40     ` Keir Fraser [this message]
2012-05-04 11:05       ` Jan Beulich
2012-05-04 12:03         ` Keir Fraser
2012-05-04 12:46           ` Jan Beulich
2012-05-04 13:27             ` Keir Fraser
2012-05-04 13:55               ` Jan Beulich
2012-05-04 13:59                 ` Keir Fraser

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=CBC9629C.324E3%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xen.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 NNTP newsgroup(s).