linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizefan@huawei.com>
To: Qiang Huang <h.huangqiang@huawei.com>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>,
	zhangwei <jovi.zhangwei@huawei.com>
Subject: Re: cgroup_fj tests will stick the nort kernel
Date: Sat, 20 Apr 2013 15:21:41 +0800	[thread overview]
Message-ID: <51724205.3000008@huawei.com> (raw)
In-Reply-To: <5171F6B3.1020907@huawei.com>

On 2013/4/20 10:00, Qiang Huang wrote:
> On 2013/4/19 15:30, Qiang Huang wrote:
>> Hi,
>>
>> I ran cgroup_fj tests on RT kernel with PREEMPT_RT_FULL disabled, it will
>> stick the system when ran cpuset stress tests, it happens everytime.
> 
> Here let me explain something, cgroup_fj is a test suit in ltp, which will do
> some functionality and pressure test on cgroup.
> 
> And the script I give below is a very simple version of cgroup_fj which only
> do one type of pressure test on cpuset subsystem.
> What he did is:
> 1. Create /dev/cgroup and mount cpuset subsystem on it.
> 2. Create 100 dir under /dev/cgroup named subgroup_1..subgroup_100.
> 3. Attach all tasks in /dev/cgroup/tasks to /dev/cgroup/subgroup_1/tasks, then
> from /dev/cgroup/subgroup_1/tasks to /dev/cgroup/subgroup_2/tasks and so on,
> finally from /dev/cgroup/subgroup_100/tasks to /dev/cgroup/tasks, then end.
> 
> And the system will stuck in step 3.
> 

This is strange. When tasks are moved from one cpuset to another, their cpumask
and nodemask will be updated and memory will be migrated, but only if the source
cpuset and dest cpuset have different masks. In this test case, all cpusets have
the same configs.

Try to comment out some lines in cpuset_attach(), and see if the problem still
exists?

diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 5fc1570..ea430e7 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -1422,16 +1422,17 @@ static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
                 * can_attach beforehand should guarantee that this doesn't
                 * fail.  TODO: have a better way to handle failure here
                 */
-               WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));
+//             WARN_ON_ONCE(set_cpus_allowed_ptr(task, cpus_attach));

-               cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
-               cpuset_update_task_spread_flag(cs, task);
+//             cpuset_change_task_nodemask(task, &cpuset_attach_nodemask_to);
+//             cpuset_update_task_spread_flag(cs, task);
        }

        /*
         * Change mm, possibly for multiple threads in a threadgroup. This is
         * expensive and may sleep.
         */
+       /*
        cpuset_attach_nodemask_from = oldcs->mems_allowed;
        cpuset_attach_nodemask_to = cs->mems_allowed;
        mm = get_task_mm(leader);
@@ -1442,6 +1443,7 @@ static void cpuset_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
                                          &cpuset_attach_nodemask_to);
                mmput(mm);
        }
+       */
 }



  reply	other threads:[~2013-04-20  7:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  7:30 cgroup_fj tests will stick the nort kernel Qiang Huang
2013-04-20  2:00 ` Qiang Huang
2013-04-20  7:21   ` Li Zefan [this message]
2013-04-22  9:39 ` Li Zefan
2013-04-22 16:00   ` Steven Rostedt
2013-04-23  5:51     ` Li Zefan
2013-04-23 10:46       ` Li Zefan
2013-04-25  6:11       ` Qiang Huang
2013-04-25  8:44         ` Li Zefan
2013-04-25  8:56           ` Qiang Huang
2013-04-25 12:53         ` Steven Rostedt
2013-04-30 14:21     ` Luis Claudio R. Goncalves

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=51724205.3000008@huawei.com \
    --to=lizefan@huawei.com \
    --cc=h.huangqiang@huawei.com \
    --cc=jovi.zhangwei@huawei.com \
    --cc=linux-rt-users@vger.kernel.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).