xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: jeremy@goop.org, Jean Delvare <jdelvare@suse.com>,
	hpa@zytor.com, peterz@infradead.org, x86@kernel.org,
	akataria@vmware.com, linux-kernel@vger.kernel.org,
	rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org,
	chrisw@sous-sol.org, mingo@redhat.com, david.vrabel@citrix.com,
	Douglas_Warzecha@dell.com, pali.rohar@gmail.com,
	xen-devel@lists.xenproject.org, tglx@linutronix.de,
	boris.ostrovsky@oracle.com, linux@roeck-us.net
Subject: Re: [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
Date: Mon, 21 Mar 2016 15:21:04 +0100	[thread overview]
Message-ID: <56F00350.4000700__14807.9218263321$1458570168$gmane$org@suse.com> (raw)
In-Reply-To: <56F0087202000078000DED9F@suse.com>

On 21/03/16 14:42, Jan Beulich wrote:
>>>> On 21.03.16 at 13:24, <JGross@suse.com> wrote:
>> @@ -758,9 +759,14 @@ struct smp_sync_call_struct {
>>  static void smp_call_sync_callback(struct work_struct *work)
>>  {
>>  	struct smp_sync_call_struct *sscs;
>> +	unsigned int cpu = smp_processor_id();
> 
> So this obtains the vCPU number, yet ...
> 
>>  	sscs = container_of(work, struct smp_sync_call_struct, work);
>> +	preempt_disable();
>> +	hypervisor_pin_vcpu(cpu);
> 
> ... here you're supposed to pass a pCPU number.
> 
> Also don't you need to call smp_processor_id() after preempt_disable()?

No, I'm running on the workqueue bound to the specific (v)cpu and I'm
expecting this vcpu to be pinned to the same numbered pcpu.

preempt_disable() is just called to avoid scheduling of another thread
while the override pinning is active.


Juergen

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

  parent reply	other threads:[~2016-03-21 14:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1458563075-30298-1-git-send-email-jgross@suse.com>
2016-03-21 12:24 ` [PATCH v2 1/6] xen: sync xen header Juergen Gross
2016-03-21 12:24 ` [PATCH v2 2/6] smp: add function to execute a function synchronously on a physical cpu Juergen Gross
2016-03-21 12:24 ` [PATCH v2 3/6] dcdbas: make use of smp_call_sync_on_phys_cpu() Juergen Gross
2016-03-21 12:24 ` [PATCH v2 4/6] hwmon: use smp_call_sync_on_phys_cpu() for dell-smm i8k Juergen Gross
2016-03-21 12:24 ` [PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu() Juergen Gross
2016-03-21 13:42   ` Jan Beulich
     [not found]   ` <56F0087202000078000DED9F@prv-mh.provo.novell.com>
2016-03-21 14:14     ` David Vrabel
     [not found]   ` <56F0087202000078000DED9F@suse.com>
2016-03-21 14:21     ` Juergen Gross [this message]
2016-03-21 12:24 ` [PATCH v2 6/6] xen: add xen_pin_vcpu() to support calling functions on a dedicated pcpu 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='56F00350.4000700__14807.9218263321$1458570168$gmane$org@suse.com' \
    --to=jgross@suse.com \
    --cc=Douglas_Warzecha@dell.com \
    --cc=JBeulich@suse.com \
    --cc=akataria@vmware.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=chrisw@sous-sol.org \
    --cc=david.vrabel@citrix.com \
    --cc=hpa@zytor.com \
    --cc=jdelvare@suse.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mingo@redhat.com \
    --cc=pali.rohar@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=x86@kernel.org \
    --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 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).