From: Nicholas Piggin <npiggin@gmail.com>
To: Haren Myneni <haren@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
nathanl@linux.ibm.com
Subject: Re: [PATCH v3 4/4] powerpc/pseries/vas: Disable window open during migration
Date: Wed, 23 Feb 2022 20:05:12 +1000 [thread overview]
Message-ID: <1645610684.3sbe7da1hv.astroid@bobo.none> (raw)
In-Reply-To: <e89d39b0860eab0b528e454aff5fc465066025a4.camel@linux.ibm.com>
Excerpts from Haren Myneni's message of February 20, 2022 6:08 am:
>
> The current partition migration implementation does not freeze the
> user space and the user space can continue open VAS windows. So
> when migration_in_progress flag is enabled, VAS open window
> API returns -EBUSY.
Seems like it could be merged with the previous patch. Unless
you're trying to specifically call out the -EBUSY chane to the
API?
Thanks,
Nick
>
> Signed-off-by: Haren Myneni <haren@linux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/vas.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c
> index df22827969db..4be80112b05e 100644
> --- a/arch/powerpc/platforms/pseries/vas.c
> +++ b/arch/powerpc/platforms/pseries/vas.c
> @@ -30,6 +30,7 @@ static struct hv_vas_cop_feat_caps hv_cop_caps;
>
> static struct vas_caps vascaps[VAS_MAX_FEAT_TYPE];
> static DEFINE_MUTEX(vas_pseries_mutex);
> +static bool migration_in_progress;
>
> static long hcall_return_busy_check(long rc)
> {
> @@ -356,8 +357,11 @@ static struct vas_window *vas_allocate_window(int vas_id, u64 flags,
> * same fault IRQ is not freed by the OS before.
> */
> mutex_lock(&vas_pseries_mutex);
> - rc = allocate_setup_window(txwin, (u64 *)&domain[0],
> - cop_feat_caps->win_type);
> + if (migration_in_progress)
> + rc = -EBUSY;
> + else
> + rc = allocate_setup_window(txwin, (u64 *)&domain[0],
> + cop_feat_caps->win_type);
> mutex_unlock(&vas_pseries_mutex);
> if (rc)
> goto out;
> @@ -890,6 +894,11 @@ int vas_migration_handler(int action)
>
> mutex_lock(&vas_pseries_mutex);
>
> + if (action == VAS_SUSPEND)
> + migration_in_progress = true;
> + else
> + migration_in_progress = false;
> +
> for (i = 0; i < VAS_MAX_FEAT_TYPE; i++) {
> vcaps = &vascaps[i];
> caps = &vcaps->caps;
> --
> 2.27.0
>
>
>
next prev parent reply other threads:[~2022-02-23 10:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-19 20:04 [PATCH v3 0/4] powerpc/pseries/vas: VAS/NXGZIP support with LPM Haren Myneni
2022-02-19 20:05 ` [PATCH v3 1/4] powerpc/pseries/vas: Define global hv_cop_caps struct Haren Myneni
2022-02-23 9:39 ` Nicholas Piggin
2022-02-19 20:05 ` [PATCH v3 2/4] powerpc/pseries/vas: Modify reconfig open/close functions for migration Haren Myneni
2022-02-23 9:54 ` Nicholas Piggin
2022-02-24 8:51 ` Haren Myneni
2022-02-19 20:06 ` [PATCH v3 3/4] powerpc/pseries/vas: Add VAS migration handler Haren Myneni
2022-02-23 10:03 ` Nicholas Piggin
2022-02-24 9:08 ` Haren Myneni
2022-02-19 20:08 ` [PATCH v3 4/4] powerpc/pseries/vas: Disable window open during migration Haren Myneni
2022-02-23 10:05 ` Nicholas Piggin [this message]
2022-02-23 9:38 ` [PATCH v3 0/4] powerpc/pseries/vas: VAS/NXGZIP support with LPM Nicholas Piggin
2022-02-23 9:43 ` Haren Myneni
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=1645610684.3sbe7da1hv.astroid@bobo.none \
--to=npiggin@gmail.com \
--cc=haren@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=nathanl@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 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).