From: Daniel Jordan <daniel.m.jordan-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Subject: Re: Race between cgroup core and the cpuset controller
Date: Tue, 23 May 2017 17:32:01 -0400 [thread overview]
Message-ID: <b7cb070c-c6df-9bf7-fd88-a1b07da28dd0@oracle.com> (raw)
In-Reply-To: <20170523200645.GG13222-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
Hi Tejun,
On 05/23/2017 04:06 PM, Tejun Heo wrote:
> Can you please see whether the following patch fixes the issue?
> Thanks.
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index f6501f4f6040..9e29dba49d6c 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -176,9 +176,10 @@ typedef enum {
> } cpuset_flagbits_t;
>
> /* convenient tests for these bits */
> -static inline bool is_cpuset_online(const struct cpuset *cs)
> +static inline bool is_cpuset_online(struct cpuset *cs)
> {
> - return test_bit(CS_ONLINE, &cs->flags);
> + return test_bit(CS_ONLINE, &cs->flags) &&
> + !percpu_ref_is_dying(&cs->css.refcnt);
> }
>
> static inline int is_cpu_exclusive(const struct cpuset *cs)
That does the trick, thanks.
Please let me know if there's anything else I can do to help.
Daniel
next prev parent reply other threads:[~2017-05-23 21:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 22:14 Race between cgroup core and the cpuset controller Daniel Jordan
[not found] ` <327ca1f5-7957-fbb9-9e5f-9ba149d40ba2-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-05-23 20:06 ` Tejun Heo
[not found] ` <20170523200645.GG13222-piEFEHQLUPpN0TnZuCh8vA@public.gmane.org>
2017-05-23 21:32 ` Daniel Jordan [this message]
[not found] ` <b7cb070c-c6df-9bf7-fd88-a1b07da28dd0-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-05-24 16:03 ` [PATCH cgroup/for-4.12-fixes] cpuset: consider dying css as offline Tejun Heo
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=b7cb070c-c6df-9bf7-fd88-a1b07da28dd0@oracle.com \
--to=daniel.m.jordan-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).