From: Jan Beulich <jbeulich@suse.com>
To: Juergen Gross <jgross@suse.com>
Cc: George Dunlap <george.dunlap@citrix.com>,
Dario Faggioli <dfaggioli@suse.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 2/3] xen/sched: carve out memory allocation and freeing from schedule_cpu_rm()
Date: Mon, 15 Aug 2022 13:52:26 +0200 [thread overview]
Message-ID: <3c4fa2e0-1b68-6206-e2cb-b85b2cb790f9@suse.com> (raw)
In-Reply-To: <20220815110410.19872-3-jgross@suse.com>
On 15.08.2022 13:04, Juergen Gross wrote:
> --- a/xen/common/sched/core.c
> +++ b/xen/common/sched/core.c
> @@ -3237,6 +3237,65 @@ out:
> return ret;
> }
>
> +static struct cpu_rm_data *schedule_cpu_rm_alloc(unsigned int cpu)
> +{
> + struct cpu_rm_data *data;
> + const struct sched_resource *sr;
> + unsigned int idx;
> +
> + rcu_read_lock(&sched_res_rculock);
> +
> + sr = get_sched_res(cpu);
> + data = xmalloc_flex_struct(struct cpu_rm_data, sr, sr->granularity - 1);
> + if ( !data )
> + goto out;
> +
> + data->old_ops = sr->scheduler;
> + data->vpriv_old = idle_vcpu[cpu]->sched_unit->priv;
> + data->ppriv_old = sr->sched_priv;
Repeating a v1 comment:
"At least from an abstract perspective, doesn't reading fields from
sr require the RCU lock to be held continuously (i.e. not dropping
it at the end of this function and re-acquiring it in the caller)?"
Initially I thought you did respond to this in some way, but when
looking for a matching reply I couldn't find one.
Jan
next prev parent reply other threads:[~2022-08-15 11:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 11:04 [PATCH v2 0/3] xen/sched: fix cpu hotplug Juergen Gross
2022-08-15 11:04 ` [PATCH v2 1/3] xen/sched: introduce cpupool_update_node_affinity() Juergen Gross
2022-08-15 11:41 ` Jan Beulich
2022-08-15 11:58 ` Juergen Gross
2022-08-15 12:01 ` Jan Beulich
2022-08-15 11:04 ` [PATCH v2 2/3] xen/sched: carve out memory allocation and freeing from schedule_cpu_rm() Juergen Gross
2022-08-15 11:52 ` Jan Beulich [this message]
2022-08-15 11:55 ` Juergen Gross
2022-08-15 12:00 ` Jan Beulich
2022-08-15 12:16 ` Juergen Gross
2022-08-15 12:34 ` Jan Beulich
2022-08-15 12:47 ` Juergen Gross
2022-08-15 14:28 ` Juergen Gross
2022-08-15 11:04 ` [PATCH v2 3/3] xen/sched: fix cpu hotplug Juergen Gross
2022-08-15 12:27 ` Jan Beulich
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=3c4fa2e0-1b68-6206-e2cb-b85b2cb790f9@suse.com \
--to=jbeulich@suse.com \
--cc=dfaggioli@suse.com \
--cc=george.dunlap@citrix.com \
--cc=jgross@suse.com \
--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 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.