linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore
@ 2014-04-23 14:38 Oren Twaig
  2014-04-24  6:22 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Oren Twaig @ 2014-04-23 14:38 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andi Kleen
  Cc: linux-kernel, Shai Fultheim (Shai@ScaleMP.com)

Set all inclusive vector allocation domain only if interrupt routing is 
set to ignore. When in comply mode, vector allocation behavior isn't 
changed.

Signed-off-by: Oren Twaig <oren@scalemp.com>
Acked-by: Shai Fultheim <shai@scalemp.com>
---
diff --git a/arch/x86/kernel/vsmp_64.c b/arch/x86/kernel/vsmp_64.c
index f6584a9..60a195d 100644
--- a/arch/x86/kernel/vsmp_64.c
+++ b/arch/x86/kernel/vsmp_64.c
@@ -27,6 +27,9 @@
  #define TOPOLOGY_REGISTER_OFFSET 0x10

  #if defined CONFIG_PCI && defined CONFIG_PARAVIRT
+
+static int irc = 1;
+
  /*
   * Interrupt control on vSMPowered systems:
   * ~AC is a shadow of IF.  If IF is 'on' AC should be 'off'
@@ -101,6 +104,10 @@ static void __init set_vsmp_pv_ops(void)
  #ifdef CONFIG_SMP
      if (cap & ctl & BIT(8)) {
          ctl &= ~BIT(8);
+
+        /* Interrupt routing set to ignore */
+        irc = 0;
+
  #ifdef CONFIG_PROC_FS
          /* Don't let users change irq affinity via procfs */
          no_irq_affinity = 1;
@@ -218,7 +225,9 @@ static void vsmp_apic_post_init(void)
  {
      /* need to update phys_pkg_id */
      apic->phys_pkg_id = apicid_phys_pkg_id;
-    apic->vector_allocation_domain = fill_vector_allocation_domain;
+
+    if (!irc)
+        apic->vector_allocation_domain = fill_vector_allocation_domain;
  }

  void __init vsmp_init(void)


---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore
  2014-04-23 14:38 [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore Oren Twaig
@ 2014-04-24  6:22 ` Ingo Molnar
  2014-04-24 14:09   ` Oren Twaig
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2014-04-24  6:22 UTC (permalink / raw)
  To: Oren Twaig
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andi Kleen,
	linux-kernel, Shai Fultheim (Shai@ScaleMP.com)


* Oren Twaig <oren@scalemp.com> wrote:

> Set all inclusive vector allocation domain only if interrupt routing
> is set to ignore. When in comply mode, vector allocation behavior
> isn't changed.

This changelog is too terse:

Please update the changelog to describe the current behavior, and how 
it affects your platform. (I.e. how do users notice, if at all?)

Then describe why you think that behavior should be changed. ie: 
what's the reason for this patch.

Only then describe the details of the change itself.

> -    apic->vector_allocation_domain = fill_vector_allocation_domain;
> +
> +    if (!irc)
> +        apic->vector_allocation_domain = fill_vector_allocation_domain;

Please also run scripts/checkpatch.pl over your patch which will 
report trivial coding style problems like the one here.

Thanks,

	Ingo

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore
  2014-04-24  6:22 ` Ingo Molnar
@ 2014-04-24 14:09   ` Oren Twaig
  0 siblings, 0 replies; 3+ messages in thread
From: Oren Twaig @ 2014-04-24 14:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Andi Kleen,
	linux-kernel, Shai Fultheim (Shai@ScaleMP.com)

Hi Ingo,

On 04/24/2014 09:22 AM, Ingo Molnar wrote:
>
> * Oren Twaig <oren@scalemp.com> wrote:
>
>> Set all inclusive vector allocation domain only if interrupt routing
>> is set to ignore. When in comply mode, vector allocation behavior
>> isn't changed.
>
> This changelog is too terse:
>
> Please update the changelog to describe the current behavior, and how
> it affects your platform. (I.e. how do users notice, if at all?)
>
> Then describe why you think that behavior should be changed. ie:
> what's the reason for this patch.
>
> Only then describe the details of the change itself.

I will send v2 of the patch with a revised and more detailed
explanation about the behavior aspect of the patch.

>
>> -    apic->vector_allocation_domain = fill_vector_allocation_domain;
>> +
>> +    if (!irc)
>> +        apic->vector_allocation_domain = fill_vector_allocation_domain;
>
> Please also run scripts/checkpatch.pl over your patch which will
> report trivial coding style problems like the one here.

Yep - did that just like the instructions on "SubmmitingPatches", unfortunately, although I've followed the Thunderbird configuration instructions
with external editor, it seems to sent the the email content wrong (bad line endings as I saw now).

So sorry for the trouble, will change to a text email client and will
resend the patch.

Thanks,
Oren.
>
> Thanks,
>
>     Ingo
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-24 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-23 14:38 [PATCH] X86: Hook apic vector allocation domain only when interrupt routing are set to ignore Oren Twaig
2014-04-24  6:22 ` Ingo Molnar
2014-04-24 14:09   ` Oren Twaig

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).