All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <mengxu@cis.upenn.edu>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Tianyang Chen <tiche@seas.upenn.edu>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@citrix.com>
Subject: Re: [PATCH for 4.7 4/4] xen: adopt .deinit_pdata and improve timer handling
Date: Mon, 9 May 2016 15:22:10 +0200	[thread overview]
Message-ID: <1462800130.5968.10.camel@citrix.com> (raw)
In-Reply-To: <CAENZ-+kwjM=kALYoBFLykPcWxhZ9LkKPmkiz61wYyV0HxYiT3Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2852 bytes --]

On Sat, 2016-05-07 at 23:19 +0200, Meng Xu wrote:
> On Tue, May 3, 2016 at 5:46 PM, Dario Faggioli
> <dario.faggioli@citrix.com> wrote:
> > 
> > 
> > The scheduling hooks API is now used properly, and no
> > initialization or de-initialization happen in
> > alloc/free_pdata any longer.
> > 
> > In fact, just like it is for Credit2, there is no real
> > need for implementing alloc_pdata and free_pdata.
> > 
> > This also made it possible to improve the replenishment
> > timer handling logic, such that now the timer is always
> > kept on one of the pCPU of the scheduler it's servicing.
> > Before this commit, in fact, even if the pCPU where the
> > timer happened to be initialized at creation time was
> > moved to another cpupool, the timer stayed there,
> > potentially inferfearing with the new scheduler of the
> > pCPU itself.
> > 
> > Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
> > --
> Reviewed-and-Tested-by: Meng Xu <mengxu@cis.upenn.edu>
> 
Thanks! :-)

> I do have a minor comment about the patch, although it is not
> important at all and it is not really about this patch...
> 
> > 
> > @@ -614,7 +612,8 @@ rt_deinit(struct scheduler *ops)
> >  {
> >      struct rt_private *prv = rt_priv(ops);
> > 
> > -    kill_timer(prv->repl_timer);
> > +    ASSERT(prv->repl_timer->status == TIMER_STATUS_invalid ||
> > +           prv->repl_timer->status == TIMER_STATUS_killed);
> I found in xen/timer.h, the comment after the definition of the
> TIMER_STATUS_invalid is
> 
>                 #define TIMER_STATUS_invalid  0 /* Should never see
> this.           */
> 
> This comment is a little contrary to how the status is used here.
> Actually, what does it exactly means by "Should never see this"?
> 
> This _invalid status is used in timer.h and it is the status when a
> timer is initialized by init_timer().
> 
As far as my understanding goes, this means that a timer, during its
operations, should never be found in this state.

In fact, this mark a situation where the timer has been allocated but
never initialized, and there are ASSERT()s around to enforce that.

However, if what one wants is _exactly_ to check whether the timer has
been allocated ut not initialized, I don't see why I can't use this.

> So I'm thinking maybe this comment can be better improved to avoid
> confusion?
> 
I don't think things are confusing, neither right now, nor after this
patch, but I'm open to others' opinion. :-)

Thanks and Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-05-09 13:22 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-03 21:46 [PATCH for 4.7 0/4] Assorted scheduling fixes Dario Faggioli
2016-05-03 21:46 ` [PATCH for 4.7 1/4] xen: sched: avoid spuriously re-enabling IRQs in csched2_switch_sched() Dario Faggioli
2016-05-04  8:48   ` Jan Beulich
2016-05-04  9:08     ` Dario Faggioli
2016-05-04 15:11   ` George Dunlap
2016-05-04 15:58     ` Dario Faggioli
2016-05-04 17:05       ` George Dunlap
2016-05-04 17:21         ` Dario Faggioli
2016-05-04 17:34           ` George Dunlap
2016-05-06 13:21             ` Dario Faggioli
2016-05-06 13:48               ` Wei Liu
2016-05-09 14:42               ` George Dunlap
2016-05-03 21:46 ` [PATCH for 4.7 2/4] xen: sched: fix killing an uninitialized timer in free_pdata Dario Faggioli
2016-05-04 15:25   ` George Dunlap
2016-05-03 21:46 ` [PATCH for 4.7 3/4] xen: credit2: fix 2 (minor) issues in load tracking logic Dario Faggioli
2016-05-04 15:38   ` George Dunlap
2016-05-03 21:46 ` [PATCH for 4.7 4/4] xen: adopt .deinit_pdata and improve timer handling Dario Faggioli
2016-05-04 15:51   ` George Dunlap
2016-05-04 15:53     ` Meng Xu
2016-05-06 23:05       ` Dario Faggioli
2016-05-07 21:19   ` Meng Xu
2016-05-08  3:12     ` Meng Xu
2016-05-09  8:07       ` Juergen Gross
2016-05-09 13:22     ` Dario Faggioli [this message]
2016-05-09 14:08       ` Meng Xu
2016-05-09 14:52         ` Dario Faggioli
2016-05-09 14:58           ` Meng Xu
2016-05-09 14:46     ` George Dunlap
2016-05-09 14:58       ` Wei Liu
2016-05-09 15:35         ` George Dunlap
2016-05-04  1:26 ` [PATCH for 4.7 0/4] Assorted scheduling fixes Konrad Rzeszutek Wilk
2016-05-04  9:06   ` Dario Faggioli
2016-05-05 12:00     ` Julien Grall
2016-05-05 12:38       ` Dario Faggioli
2016-05-04 15:53 ` George Dunlap
2016-05-04 16:04 ` Wei Liu
2016-05-07 21:23   ` Meng Xu

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=1462800130.5968.10.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=tiche@seas.upenn.edu \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.