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:	Fri, 14 Nov 2008 08:15:32 +0900 (JST)
From:	Hirokazu Takahashi <taka@...inux.co.jp>
To:	balbir@...ux.vnet.ibm.com
Cc:	kamezawa.hiroyu@...fujitsu.com, menage@...gle.com,
	xen-devel@...ts.xensource.com,
	containers@...ts.linux-foundation.org,
	linux-kernel@...r.kernel.org,
	virtualization@...ts.linux-foundation.org, dm-devel@...hat.com,
	agk@...rceware.org, fernando@....ntt.co.jp, xemul@...nvz.org
Subject: Re: [dm-devel] Re: [PATCH 0/8] I/O bandwidth controller and BIO
 tracking

Hi, Balbir,

> Hirokazu Takahashi wrote:
> > Hi, Kamezawa-san,
> > 
> > This patch makes the page_cgroup framework be able to be used even if
> > the compile option of the cgroup memory controller is off.
> > So bio-cgroup can use this framework without the memory controller.
> > 
> > Signed-off-by: Hirokazu Takahashi <taka@...inux.co.jp>
> > 
> > diff -dupr linux-2.6.28-rc2.bc0/include/linux/memcontrol.h linux-2.6.28-rc2/include/linux/memcontrol.h
> > --- linux-2.6.28-rc2.bc0/include/linux/memcontrol.h	2008-11-10 18:31:34.000000000 +0900
> > +++ linux-2.6.28-rc2/include/linux/memcontrol.h	2008-11-11 13:51:42.000000000 +0900
> > @@ -27,6 +27,9 @@ struct mm_struct;
> > 
> >  #ifdef CONFIG_CGROUP_MEM_RES_CTLR
> > 
> > +extern void __init_mem_page_cgroup(struct page_cgroup *pc);
> > +#define  mem_cgroup_disabled() mem_cgroup_subsys.disabled
> > +
> >  extern int mem_cgroup_newpage_charge(struct page *page, struct mm_struct *mm,
> >  				gfp_t gfp_mask);
> >  /* for swap handling */
> > @@ -81,6 +84,15 @@ extern long mem_cgroup_calc_reclaim(stru
> >  #else /* CONFIG_CGROUP_MEM_RES_CTLR */
> >  struct mem_cgroup;
> > 
> > +static inline void __init_mem_page_cgroup(struct page_cgroup *pc)
> > +{
> > +}
> > +
> > +static inline int mem_cgroup_disabled(void)
> > +{
> > +	return 1;
> > +}
> > +
> 
> With CONFIG_CGROUP_MEM_RES_CTLR not defined, page_cgroup init routines will just
> return, is that what bio page_cgroup needs?
> 
> -- 
> 	Balbir

One of the other patches includes the following code, which calls 
__init_bio_page_cgroup() to initialize bio-cgroup thing.

+++ linux-2.6.28-rc2/mm/page_cgroup.c	2008-11-12 11:20:33.000000000 +0900
@@ -9,6 +9,7 @@
 #include <linux/vmalloc.h>
 #include <linux/cgroup.h>
 #include <linux/memcontrol.h>
+#include <linux/biotrack.h>
 
 static void __meminit
 __init_page_cgroup(struct page_cgroup *pc, unsigned long pfn)
@@ -16,6 +17,7 @@ __init_page_cgroup(struct page_cgroup *p
 	pc->flags = 0;
 	pc->page = pfn_to_page(pfn);
 	__init_mem_page_cgroup(pc);
+	__init_bio_page_cgroup(pc);
 }
 static unsigned long total_usage;
--
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