From: Dario Faggioli <dario.faggioli@citrix.com>
To: Juergen Gross <jgross@suse.com>, xen-devel@lists.xen.org
Cc: Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	David Vrabel <david.vrabel@citrix.com>,
	Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH v3 2/6] xen: add hypercall option to override and restore vcpu affinity
Date: Tue, 8 Mar 2016 12:45:20 +0100	[thread overview]
Message-ID: <1457437520.3102.172.camel@citrix.com> (raw)
In-Reply-To: <1457023730-10997-3-git-send-email-jgross@suse.com>
[-- Attachment #1.1: Type: text/plain, Size: 1994 bytes --]
On Thu, 2016-03-03 at 17:48 +0100, Juergen Gross wrote:
> Some hardware (e.g. Dell studio 1555 laptops) require SMIs to be
> called on physical cpu 0 only. Linux drivers like dcdbas or i8k try
> to achieve this by pinning the running thread to cpu 0, but in Dom0
> this is not enough: the vcpu must be pinned to physical cpu 0 via
> Xen, too.
> 
> Add a stable hypercall option SCHEDOP_pin_override to the sched_op
> hypercall to achieve this. It is taking a physical cpu number as
> parameter. If pinning is possible (the calling domain has the
> privilege to make the call and the cpu is available in the domain's
> cpupool) the calling vcpu is pinned to the specified cpu.
>
I would have added the "and the cpu is available in the domain's
cpupool" part in the comment in public headers too, such as:
> --- a/xen/include/public/sched.h
> +++ b/xen/include/public/sched.h
> @@ -118,6 +118,17 @@
>   * With id != 0 and timeout != 0, poke watchdog timer and set new
> timeout.
>   */
>  #define SCHEDOP_watchdog    6
> +
> +/*
> + * Override the current vcpu affinity by pinning it to one physical
> cpu or undo
> + * this override restoring the previous affinity.
> + * @arg == pointer to sched_pin_override_t structure.
> + *
> + * A negative pcpu value will undo a previous pin override and
> restore the
> + * previous cpu affinity.
> + * This call is allowed for the hardware domain only.
", and succeeds only if the specified cpu is available in the domain's
cpupool."
> + */
> +#define SCHEDOP_pin_override 7
>  /* ` } */
>  
>  struct sched_shutdown {
>
In any case, the scheduling part is:
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
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: 181 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply	other threads:[~2016-03-08 11:45 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 16:48 [PATCH v3 0/6] add hypercall option to temporarily pin a vcpu Juergen Gross
2016-03-03 16:48 ` [PATCH v3 1/6] xen, cpupool: correct error handling when removing cpu from cpupool Juergen Gross
2016-03-04  9:42   ` Jan Beulich
     [not found]   ` <56D9668602000078000D9400@suse.com>
2016-03-04  9:54     ` Juergen Gross
2016-03-04 10:03       ` Jan Beulich
2016-03-08 10:46   ` Dario Faggioli
2016-03-03 16:48 ` [PATCH v3 2/6] xen: add hypercall option to override and restore vcpu affinity Juergen Gross
2016-03-04  9:44   ` Jan Beulich
2016-03-08 11:45   ` Dario Faggioli [this message]
2016-03-03 16:48 ` [PATCH v3 3/6] xen: add force flag to xen_domctl_vcpuaffinity for undoing pin override Juergen Gross
2016-03-04  9:45   ` Jan Beulich
2016-03-03 16:48 ` [PATCH v3 4/6] libxc: do some retries in xc_cpupool_removecpu() for EBUSY case Juergen Gross
2016-03-08 13:16   ` Dario Faggioli
2016-03-08 16:12     ` Juergen Gross
2016-03-03 16:48 ` [PATCH v3 5/6] libxl: print message how to recover from xl cpupool-cpu-remove errors Juergen Gross
2016-03-08 13:18   ` Dario Faggioli
2016-03-08 15:58   ` Wei Liu
2016-03-03 16:48 ` [PATCH v3 6/6] libxl: add force option for xl vcpu-pin Juergen Gross
2016-03-08 13:29   ` Dario Faggioli
2016-03-08 15:58   ` Wei Liu
2016-03-08 16:11     ` Juergen Gross
2016-03-08 17:16   ` Dario Faggioli
2016-03-08 17:19     ` Juergen Gross
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=1457437520.3102.172.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=david.vrabel@citrix.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.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).