All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Lynch <nathanl@linux.ibm.com>
To: Gautham R Shenoy <ego@linux.vnet.ibm.com>
Cc: Tyrel Datwyler <tyreld@linux.ibm.com>,
	Kamalesh Babulal <kamaleshb@in.ibm.com>,
	linux-kernel@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline
Date: Tue, 29 Oct 2019 10:29:30 -0500	[thread overview]
Message-ID: <87tv7rlgdh.fsf@linux.ibm.com> (raw)
In-Reply-To: <20191029111314.GC12266@in.ibm.com>

Gautham R Shenoy <ego@linux.vnet.ibm.com> writes:
> On Fri, Oct 25, 2019 at 06:03:26PM -0500, Nathan Lynch wrote:
>> "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> writes:
>> > This is the v2 of the fix to change the default behaviour of
>> > cede_offline.
>> 
>> OK, but why keep the cede offline behavior at all? Can we remove it? I
>> think doing so would allow us to remove all the code that temporarily
>> onlines threads for partition migration.
>
> May be I am missing something. But don't we want all the CPUs to come
> online and execute the H_JOIN hcall before performing partition
> migration? How will this change whether the offlined CPUs are in
> H_CEDE or rtas-stop-self?

The platform considers threads in H_CEDE to be active. It considers
threads that have performed stop-self to be inactive until they have
been restarted. The Thread Join Option section of the PAPR says active
threads must perform the H_JOIN. I have confirmed with hypervisor
development that this implies that the OS needn't involve inactive
threads in the join/suspend sequence.

It isn't quite explicit in the log for 120496ac2d2d ("powerpc: Bring all
threads online prior to migration/hibernation"), but it stands to reason
that using cede for offline is the reason that the code to online all
threads for join/suspend was introduced in the first place.

WARNING: multiple messages have this Message-ID (diff)
From: Nathan Lynch <nathanl@linux.ibm.com>
To: Gautham R Shenoy <ego@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Tyrel Datwyler <tyreld@linux.ibm.com>,
	Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>,
	Kamalesh Babulal <kamaleshb@in.ibm.com>,
	"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Subject: Re: [PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline
Date: Tue, 29 Oct 2019 10:29:30 -0500	[thread overview]
Message-ID: <87tv7rlgdh.fsf@linux.ibm.com> (raw)
In-Reply-To: <20191029111314.GC12266@in.ibm.com>

Gautham R Shenoy <ego@linux.vnet.ibm.com> writes:
> On Fri, Oct 25, 2019 at 06:03:26PM -0500, Nathan Lynch wrote:
>> "Gautham R. Shenoy" <ego@linux.vnet.ibm.com> writes:
>> > This is the v2 of the fix to change the default behaviour of
>> > cede_offline.
>> 
>> OK, but why keep the cede offline behavior at all? Can we remove it? I
>> think doing so would allow us to remove all the code that temporarily
>> onlines threads for partition migration.
>
> May be I am missing something. But don't we want all the CPUs to come
> online and execute the H_JOIN hcall before performing partition
> migration? How will this change whether the offlined CPUs are in
> H_CEDE or rtas-stop-self?

The platform considers threads in H_CEDE to be active. It considers
threads that have performed stop-self to be inactive until they have
been restarted. The Thread Join Option section of the PAPR says active
threads must perform the H_JOIN. I have confirmed with hypervisor
development that this implies that the OS needn't involve inactive
threads in the join/suspend sequence.

It isn't quite explicit in the log for 120496ac2d2d ("powerpc: Bring all
threads online prior to migration/hibernation"), but it stands to reason
that using cede for offline is the reason that the code to online all
threads for join/suspend was introduced in the first place.

  reply	other threads:[~2019-10-29 15:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 10:33 [PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline Gautham R. Shenoy
2019-10-22 10:33 ` Gautham R. Shenoy
2019-10-22 10:33 ` [PATCH v2 1/1] pseries/hotplug-cpu: Change default behaviour of cede_offline to "off" Gautham R. Shenoy
2019-10-22 10:33   ` Gautham R. Shenoy
2019-10-31 16:30   ` Nathan Lynch
2019-10-31 16:30     ` Nathan Lynch
2019-10-25 23:03 ` [PATCH v2 0/1] pseries/hotplug: Change the default behaviour of cede_offline Nathan Lynch
2019-10-25 23:03   ` Nathan Lynch
2019-10-29 11:13   ` Gautham R Shenoy
2019-10-29 11:13     ` Gautham R Shenoy
2019-10-29 15:29     ` Nathan Lynch [this message]
2019-10-29 15:29       ` Nathan Lynch

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=87tv7rlgdh.fsf@linux.ibm.com \
    --to=nathanl@linux.ibm.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=ego@linux.vnet.ibm.com \
    --cc=kamaleshb@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=npiggin@gmail.com \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=tyreld@linux.ibm.com \
    /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.