xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v2] x86/apic/x2apic: Share IRQ vector between cluster members only when no cpumask is specified
Date: Fri, 25 Aug 2017 12:00:40 -0400	[thread overview]
Message-ID: <50efc35c-a9c2-a00e-f351-b4febc16554e@oracle.com> (raw)
In-Reply-To: <59A056A70200007800173D81@prv-mh.provo.novell.com>

On 08/25/2017 10:56 AM, Jan Beulich wrote:
>>>> On 08.08.17 at 17:59, <boris.ostrovsky@oracle.com> wrote:
>> --- a/xen/arch/x86/genapic/delivery.c
>> +++ b/xen/arch/x86/genapic/delivery.c
>> @@ -30,7 +30,8 @@ void __init clustered_apic_check_flat(void)
>>  	printk("Enabling APIC mode:  Flat.  Using %d I/O APICs\n", nr_ioapics);
>>  }
>>  
>> -const cpumask_t *vector_allocation_cpumask_flat(int cpu)
>> +const cpumask_t *vector_allocation_cpumask_flat(int cpu,
>> +    const cpumask_t *cpumask)
>>  {
>>  	return &cpu_online_map;
>>  } 
>> @@ -58,7 +59,8 @@ void __init clustered_apic_check_phys(void)
>>  	printk("Enabling APIC mode:  Phys.  Using %d I/O APICs\n", nr_ioapics);
>>  }
>>  
>> -const cpumask_t *vector_allocation_cpumask_phys(int cpu)
>> +const cpumask_t *vector_allocation_cpumask_phys(int cpu,
>> +    const cpumask_t *cpumask)
>>  {
>>  	return cpumask_of(cpu);
>>  }
>> --- a/xen/arch/x86/genapic/x2apic.c
>> +++ b/xen/arch/x86/genapic/x2apic.c
>> @@ -72,8 +72,12 @@ static void __init clustered_apic_check_x2apic(void)
>>  {
>>  }
>>  
>> -static const cpumask_t *vector_allocation_cpumask_x2apic_cluster(int cpu)
>> +static const cpumask_t *vector_allocation_cpumask_x2apic_cluster(int cpu,
>> +    const cpumask_t *cpumask)
>>  {
>> +    if ( !cpumask )
>> +        return cpumask_of(cpu);
>> +
>>      return per_cpu(cluster_cpus, cpu);
>>  }
> It is a strange addition you're making here: None of the three
> implementations care about the passed in mask. Why is this then
> not a bool with a suitable name?

I can pass in a bool. Say, 'bool share_vectors'.

>
> Additionally, shouldn't vector_allocation_cpumask_flat() behave
> similar to vector_allocation_cpumask_x2apic_cluster() then?

Yes, I should probably do that as well.

>
> Further I'd prefer if you made it a single return statement here,
> using a conditional expression.
>
> And finally I continue to be not really happy about the change as
> a whole. Despite what was discussed on v1, I'm concerned of the
> effects of this on hosts _not_ suffering from vector shortage.
> Could you live with the new behavior requiring a command line
> option to enable?

I can add something like 'apic_share_vectors', defaulting to true,
although it will not be useful in case of a hotplug. Defaulting to false?

-boris


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

  reply	other threads:[~2017-08-25 16:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 15:59 [PATCH v2] x86/apic/x2apic: Share IRQ vector between cluster members only when no cpumask is specified Boris Ostrovsky
2017-08-25 14:56 ` Jan Beulich
2017-08-25 16:00   ` Boris Ostrovsky [this message]
2017-08-28  7:38     ` Jan Beulich
2017-08-28 14:35       ` Boris Ostrovsky
2017-08-28 15:41         ` Jan Beulich
2017-08-28 20:53           ` Boris Ostrovsky

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=50efc35c-a9c2-a00e-f351-b4febc16554e@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@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).