All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Tianyang Chen <tiche@seas.upenn.edu>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Dario Faggioli <dario.faggioli@citrix.com>,
	Meng Xu <mengxu@cis.upenn.edu>
Subject: Re: [PATCH 1/2] xen: sched: rtds refactor code
Date: Wed, 22 Jun 2016 16:51:16 +0100	[thread overview]
Message-ID: <CAFLBxZYu2qZPqX3D6D2Rv3A_p5KW2D2vfs9usG2eH08yqgSF_w@mail.gmail.com> (raw)
In-Reply-To: <1463356490-9780-2-git-send-email-tiche@seas.upenn.edu>

On Mon, May 16, 2016 at 12:54 AM, Tianyang Chen <tiche@seas.upenn.edu> wrote:
> No functional change:
>  -Various coding style fix
>  -Added comments for UPDATE_LIMIT_SHIFT.
>
> Signed-off-by: Tianyang Chen <tiche@seas.upenn.edu>

Hey Tianyang,

The changes here for the most part look good (with a few comments --
see below), but the title and changelog could use some work.

For one, you're not actually doing any refactoring -- I'd call this
patch a "clean-up" patch.

Secondly, you should go through and enumerate the different clean-ups
you do.  For instance, you mention why you remove the __ at the head
of functions in your cover letter, but you don't mention it here.

> ---
>  xen/common/sched_rt.c |  106 ++++++++++++++++++++++++++-----------------------
>  1 file changed, 56 insertions(+), 50 deletions(-)
>
> diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c
> index 7f8f411..1584d53 100644
> --- a/xen/common/sched_rt.c
> +++ b/xen/common/sched_rt.c
> @@ -80,7 +80,7 @@
>   * in schedule.c
>   *
>   * The functions involes RunQ and needs to grab locks are:
> - *    vcpu_insert, vcpu_remove, context_saved, __runq_insert
> + *    vcpu_insert, vcpu_remove, context_saved, runq_insert
>   */
>
>
> @@ -107,6 +107,12 @@
>   */
>  #define RTDS_MIN_BUDGET     (MICROSECS(10))
>
> +/*
> + * UPDATE_LIMIT_SHIT: a constant used in rt_update_deadline(). When finding

Missing an 'F'. :-)

> + * the next deadline, performing addition could be faster if the difference
> + * between cur_deadline and now is small. If the difference is bigger than
> + * 1024 * period, use multiplication.
> + */
>  #define UPDATE_LIMIT_SHIFT      10
>
>  /*
> @@ -158,25 +164,25 @@
>  static void repl_timer_handler(void *data);
>
>  /*
> - * Systme-wide private data, include global RunQueue/DepletedQ
> + * System-wide private data, include global RunQueue/DepletedQ
>   * Global lock is referenced by schedule_data.schedule_lock from all
>   * physical cpus. It can be grabbed via vcpu_schedule_lock_irq()
>   */
>  struct rt_private {
> -    spinlock_t lock;            /* the global coarse grand lock */
> -    struct list_head sdom;      /* list of availalbe domains, used for dump */
> -    struct list_head runq;      /* ordered list of runnable vcpus */
> -    struct list_head depletedq; /* unordered list of depleted vcpus */
> -    struct list_head replq;     /* ordered list of vcpus that need replenishment */
> -    cpumask_t tickled;          /* cpus been tickled */
> -    struct timer *repl_timer;   /* replenishment timer */
> +    spinlock_t lock;             /* the global coarse grand lock */

* course-grained

Also, I'm not sure what the point of indenting all these comments out
an extra space is.  I don't object, of course, if Meng doesn't object,
but at very least it could use a one-line explanation in the
changelog.

Otherwise, looks good, thanks.

 -George

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

  parent reply	other threads:[~2016-06-22 16:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-15 23:54 [PATCH 0/2] xen: sched: rtds refactor code Tianyang Chen
2016-05-15 23:54 ` [PATCH 1/2] " Tianyang Chen
2016-05-17 15:06   ` Meng Xu
2016-06-22 15:51   ` George Dunlap [this message]
2016-06-22 16:16     ` Meng Xu
2016-06-23 10:42       ` George Dunlap
2016-06-24  7:45         ` Dario Faggioli
2016-06-24 11:36           ` Meng Xu
2016-05-15 23:54 ` [PATCH 2/2] xen: sched: rtds: use non-atomic bit-ops Tianyang Chen
2016-05-17 15:08   ` Meng Xu
2016-05-17 15:05 ` [PATCH 0/2] xen: sched: rtds refactor code 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=CAFLBxZYu2qZPqX3D6D2Rv3A_p5KW2D2vfs9usG2eH08yqgSF_w@mail.gmail.com \
    --to=george.dunlap@citrix.com \
    --cc=dario.faggioli@citrix.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=tiche@seas.upenn.edu \
    --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.