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]
Date:	Wed, 27 May 2009 20:53:29 +0900 (JST)
From:	Ryo Tsuruta <ryov@...inux.co.jp>
To:	righi.andrea@...il.com
Cc:	vgoyal@...hat.com, guijianfeng@...fujitsu.com, nauman@...gle.com,
	dpshah@...gle.com, lizf@...fujitsu.com, mikew@...gle.com,
	fchecconi@...il.com, paolo.valente@...more.it,
	jens.axboe@...cle.com, fernando@....ntt.co.jp,
	s-uchida@...jp.nec.com, taka@...inux.co.jp, jmoyer@...hat.com,
	dhaval@...ux.vnet.ibm.com, balbir@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org,
	containers@...ts.linux-foundation.org, agk@...hat.com,
	dm-devel@...hat.com, snitzer@...hat.com, m-ikeda@...jp.nec.com,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] io-controller: Add io group reference handling for
 request

Andrea Righi <righi.andrea@...il.com> wrote:
> On Wed, May 27, 2009 at 03:56:31PM +0900, Ryo Tsuruta wrote:
> > > I think that only putting the hook in try_to_unmap() doesn't work
> > > correctly, because IOs will be charged to reclaiming processes or
> > > kswapd. These IOs should be charged to processes which cause memory
> > > pressure.
> > 
> > Consider the following case:
> > 
> >   (1) There are two processes Proc-A and Proc-B.
> >   (2) Proc-A maps a large file into many pages by mmap() and writes
> >       many data to the file.
> >   (3) After (2), Proc-B try to get a page, but there are no available
> >       pages because Proc-A has used them.
> >   (4) kernel starts to reclaim pages, call try_to_unmap() to unmap
> >       a page which is owned by Proc-A, then blkio_cgroup_set_owner()
> >       sets Proc-B's ID on the page because the task's context is Proc-B.
> >   (5) After (4), kernel writes the page out to a disk. This IO is
> >       charged to Proc-B.
> > 
> > In the above case, I think that the IO should be charged to a Proc-A,
> > because the IO is caused by Proc-A's memory pressure. 
> > I think we should consider in the case without memory and swap
> > isolation.
> 
> mmmh.. even if they're strictly related I think we're mixing two
> different problems in this way: memory pressure control and IO control.
> 
> It seems you're proposing something like the badness() for OOM
> conditions to charge swap IO depending on how bad is a cgroup in terms
> of memory consumption. I don't think this is the right way to proceed,
> also because we already have the memory and swap control.

cgroups support multiple hierarchy and it allows to have different
divisions of tasks among hierarchy like below:

                                 PIDs
   mem+swap /hier1/grp1/tasks <= 1, 2, 3, 4
   blkio    /hier2/grp2/tasks <= 1, 2
                   grp3/tasks <= 3, 4

Don't we need to consider this case?

Thanks,
Ryo Tsuruta
--
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