lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081121152122.GA969@gandalf.sssup.it>
Date:	Fri, 21 Nov 2008 16:21:22 +0100
From:	Fabio Checconi <fchecconi@...il.com>
To:	Vivek Goyal <vgoyal@...hat.com>
Cc:	Nauman Rafique <nauman@...gle.com>, Li Zefan <lizf@...fujitsu.com>,
	Divyesh Shah <dpshah@...gle.com>,
	Ryo Tsuruta <ryov@...inux.co.jp>, linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org,
	virtualization@...ts.linux-foundation.org, jens.axboe@...cle.com,
	taka@...inux.co.jp, righi.andrea@...il.com, s-uchida@...jp.nec.com,
	fernando@....ntt.co.jp, balbir@...ux.vnet.ibm.com,
	akpm@...ux-foundation.org, menage@...gle.com, ngupta@...gle.com,
	riel@...hat.com, jmoyer@...hat.com, peterz@...radead.org,
	paolo.valente@...more.it
Subject: Re: [patch 0/4] [RFC] Another proportional weight IO controller

> From: Vivek Goyal <vgoyal@...hat.com>
> Date: Fri, Nov 21, 2008 09:58:23AM -0500
>
> On Fri, Nov 21, 2008 at 04:05:33AM +0100, Fabio Checconi wrote:
> > > From: Vivek Goyal <vgoyal@...hat.com>
> > > Date: Thu, Nov 20, 2008 04:31:55PM -0500
> > >
> > ...
> > > Hi Fabio,
> > > 
> > > I though will give bfq a try.  I get following when I put my current shell
> > > into a newly created cgroup and then try to do "ls".
> > > 
> > 
> > The posted patch cannot work as it is, I'm sorry for that ugly bug.
> > Do you still have problems with this one applied?
> > 
> > ---
> > diff --git a/block/bfq-cgroup.c b/block/bfq-cgroup.c
> > index efb03fc..ed8c597 100644
> > --- a/block/bfq-cgroup.c
> > +++ b/block/bfq-cgroup.c
> > @@ -168,7 +168,7 @@ static void bfq_group_chain_link(struct bfq_data *bfqd, struct cgroup *cgroup,
> >  
> >  		spin_lock_irqsave(&bgrp->lock, flags);
> >  
> > -		rcu_assign_pointer(bfqg->bfqd, bfqd);
> > +		rcu_assign_pointer(leaf->bfqd, bfqd);
> >  		hlist_add_head_rcu(&leaf->group_node, &bgrp->group_data);
> >  		hlist_add_head(&leaf->bfqd_node, &bfqd->group_list);
> 
> Thanks Fabio. This fix solves the issue for me.
> 

Ok thank you.


> I did a quick testing and I can see the differential service if I create
> two cgroups of different priority. How do I map ioprio to shares? I
> mean lets say one cgroup has ioprio 4 and other has got ioprio 7, then
> what's the respective share(%) of each cgroup?
> 

I thought I wrote it somewhere, but maybe I missed that; weights are
mapped linearly, in decreasing order of priority:

  weight = 8 - ioprio

[ the calculation is done in bfq_weight_t bfq_ioprio_to_weight() ]

So, with ioprio 4 you have weight 4, and with ioprio 7 you have weight 1.
The shares, as long as the two tasks/groups are active on the disk,
are 4/5 and 1/5 respectively.

This interface is really ugly, but it allows compatible uses of
ioprios with the two schedulers.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ