* Dhaval Giani <[email protected]> [2008-12-12 10:06:06]:

> On Fri, Dec 12, 2008 at 09:59:54AM +0530, Balbir Singh wrote:
> > * Dhaval Giani <[email protected]> [2008-12-12 09:47:13]:
> > 
> > > On Fri, Dec 12, 2008 at 02:53:44AM +0530, Balbir Singh wrote:
> > > > Hi, All,
> > > > 
> > > > As discussed in the previous thread
> > > > http://article.gmane.org/gmane.comp.lib.libcg.devel/139, we don't have
> > > > the concept of default groups and tasks should be able to return back
> > > > to their default group when done.
> > > > 
> > > > Here is a fix to the cgconfig script to fix the issue. Please review,
> > > > comment on it.
> > > > 
> > > > Signed-off-by: Balbir Singh <[email protected]>
> > > > 
> > > > Index: scripts/init.d/cgconfig
> > > > ===================================================================
> > > > --- scripts/init.d/cgconfig     (revision 225)
> > > > +++ scripts/init.d/cgconfig     (working copy)
> > > > @@ -82,6 +82,56 @@
> > > >                  #log_progress_msg "Starting cgconfig service: "
> > > >                  cgconfigparser -l $CONFIG_FILE
> > > >          fi
> > > > +
> > > > +        declare defaultcgroup
> > > > +
> > > > +        if [ -f /etc/cgrules.conf ]
> > > > +        then
> > > > +            read user ctrl defaultcgroup <<< \
> > > > +                `grep -m1 ^\* /etc/cgrules.conf`
> > > > +            if [[ -n $defaultcgroup && $defaultcgroup = "*" ]]
> > > > +            then
> > > > +                log_warning_msg "/etc/cgrules.conf incorrect"
> > > > +                log_warning_msg "Overriding it"
> > > > +                defaultcgroup=
> > > > +            fi
> > > > +        fi
> > > > +
> > > > +        if [ -z $defaultcgroup ]
> > > > +        then
> > > > +            defaultcgroup=sysdefault/
> > > > +        fi
> > > > +        #
> > > > +        # Create a default class for tasks to return back to
> > > > +        #
> > > > +        parse_mounts
> > > > +        for i in `seq 1 $maxindex`
> > > > +        do
> > > > +            #
> > > > +            # Ignore if directory already exists
> > > > +            #
> > > > +            mkdir ${MOUNTPOINT[$i]}/$defaultcgroup 2> /dev/null
> > > > +            chmod a+rw ${MOUNTPOINT[$i]}/$defaultcgroup/tasks
> > > > +            #
> > > > +            # special rule for cpusets
> > > > +            #
> > > 
> > > Need a special rule for the group scheduler. You will not be able to
> > > move in real time tasks into defaultcgroup.
> > >
> > 
> > I expermented and tried with that, my movement fails already, which is
> > expected. What special rule do we need?
> > 
> 
> You will need to setup a non-zero cpu.sched_rt_runtime_us, but it is not
> as simple as just copying the value from the parent (because than other
> groups will not get any rt time)
>

In that case, I'll let the system administrator setup
cpu.sched_rt_runtime_us, if they really care to make sure that RT
tasks should migrate to the default group. Otherwise, all RT tasks
stay in root.

The combinations of controllers and their semantics are getting out of
hand (honestly). This I think is a fair trade-off.

-- 
        Balbir

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to