Re: [PATCH 1/2] cgroup map files: Add cgroup map data type

2008-02-21 Thread YAMAMOTO Takashi
> The map type is printed in a similar format to /proc/meminfo or > /proc//status, i.e. "$key: $value\n" this description doesn't seem to match with the code. YAMAMOTO Takashi > +static int cgroup_map_add(struct cgroup_map_cb *cb, const char *key, u64 > value) >

Re: [PATCH 0/2] cgroup map files: Add a key/value map file type to cgroups

2008-02-19 Thread YAMAMOTO Takashi
> On Feb 19, 2008 9:48 PM, YAMAMOTO Takashi <[EMAIL PROTECTED]> wrote: > > > > it changes the format from "%s %lld" to "%s: %llu", right? > > why? > > > > The colon for consistency with maps in /proc. I think it also makes it > slightl

Re: [PATCH 0/2] cgroup map files: Add a key/value map file type to cgroups

2008-02-19 Thread YAMAMOTO Takashi
> - simplifies transition to a future efficient cgroups binary API > > Signed-off-by: Paul Menage <[EMAIL PROTECTED]> it changes the format from "%s %lld" to "%s: %llu", right? why? YAMAMOTO Takashi -- To unsubscribe from this list: send the line "unsub

Re: [PATCH 2/3] memcgroup: fix typo in VM_BUG_ON()

2008-02-17 Thread YAMAMOTO Takashi
gt;= nr_to_scan) > break; > page = pc->page; > - VM_BUG_ON(!pc); > + VM_BUG_ON(!page); can't page be NULL here if mem_cgroup_uncharge clears pc->page behind us? ie. bug. YAMAMOTO Takashi -- To unsubscribe from this l

Re: [PATCH 2/3] memcgroup: fix typo in VM_BUG_ON()

2008-02-17 Thread YAMAMOTO Takashi
type page_cgroup and we use list_for_each_entry_safe_reverse. Not > sure > why we can't bug on pc. pc is dereferenced before this VM_BUG_ON. YAMAMOTO Takashi > > > > -- > Warm Regards, > Balbir Singh > Linux Technology Center > IBM, IST

Re: [dm-devel] [PATCH 0/2] dm-band: The I/O bandwidth controller: Overview

2008-01-24 Thread YAMAMOTO Takashi
implementation of memory subsystem associates pages to cgroups directly, rather than via tasks. so it isn't straightforward to use the information for other classification mechanisms like yours which might not share the view of "hierarchy" with the memory subsystem. YAMAMOTO Takashi

Re: [dm-devel] [PATCH 0/2] dm-band: The I/O bandwidth controller: Overview

2008-01-23 Thread YAMAMOTO Takashi
I/O correctly: > > Yes, this should be mentioned in the document with the current implementation > as you pointed out. > > By the way, I think once a memory controller of cgroup is introduced, it will > help to track down which cgroup is the original source. do you mean to make

Re: [PATCH][for -mm] per-zone and reclaim enhancements for memory controller take 3 [3/10] per-zone active inactive counter

2007-11-28 Thread YAMAMOTO Takashi
> +static inline struct mem_cgroup_per_zone * > +mem_cgroup_zoneinfo(struct mem_cgroup *mem, int nid, int zid) > +{ > + if (!mem->info.nodeinfo[nid]) can this be true? YAMAMOTO Takashi > + return NULL; > + return &mem->info.nodeinfo[nid]-&

Re: [PATCH][for -mm] per-zone and reclaim enhancements for memory controller take 3 [3/10] per-zone active inactive counter

2007-11-28 Thread YAMAMOTO Takashi
__mem_cgroup_remove_list(pc); > kfree(pc); > } else /* being uncharged ? ...do relax */ > break; 'active' seems unused. YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsub

Re: [-mm PATCH 5/10] Memory controller task migration (v7)

2007-08-28 Thread YAMAMOTO Takashi
> YAMAMOTO Takashi wrote: > >> Allow tasks to migrate from one container to the other. We migrate > >> mm_struct's mem_container only when the thread group id migrates. > > > >> + /* > >> + * Only thread group leaders are allowed to migrate,

Re: [-mm PATCH 5/10] Memory controller task migration (v7)

2007-08-27 Thread YAMAMOTO Takashi
+ */ > + if (p->tgid != p->pid) > + goto out; does it mean that you can't move a process between containers once its thread group leader exited? YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a m

Re: [PATCH] Memory controller Add Documentation

2007-08-24 Thread YAMAMOTO Takashi
> +echo 1 > /proc/sys/vm/drop_pages will help get rid of some of the pages > +cached in the container (page cache pages). drop_caches YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] Mor

Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-08-15 Thread YAMAMOTO Takashi
> YAMAMOTO Takashi wrote: > >> + lock_meta_page(page); > >> + /* > >> + * Check if somebody else beat us to allocating the meta_page > >> + */ > >> + race_mp = page_get_meta_page(page); > >> + if (race_mp)

Re: [-mm PATCH 8/9] Memory controller add switch to control what type of pages to limit (v4)

2007-08-12 Thread YAMAMOTO Takashi
> YAMAMOTO Takashi wrote: > >> Choose if we want cached pages to be accounted or not. By default both > >> are accounted for. A new set of tunables are added. > >> > >> echo -n 1 > mem_control_type > >> > >> switches the acc

Re: [-mm PATCH 8/9] Memory controller add switch to control what type of pages to limit (v4)

2007-08-12 Thread YAMAMOTO Takashi
t; > switches the behaviour back MEM_CONTAINER_TYPE_ALL is 3, not 2. YAMAMOTO Takashi > +enum { > + MEM_CONTAINER_TYPE_UNSPEC = 0, > + MEM_CONTAINER_TYPE_MAPPED, > + MEM_CONTAINER_TYPE_CACHED, > + MEM_CONTAINER_TYPE_ALL, > + MEM_CONTAINER_TYPE_MAX, >

Re: [-mm PATCH 6/9] Memory controller add per container LRU and reclaim (v4)

2007-07-30 Thread YAMAMOTO Takashi
mp = list_entry(src->prev, struct meta_page, lru); what prevents another thread from freeing mp here? > + spin_lock(&mem_cont->lru_lock); > + if (mp) > + page = mp->page; > + spin_unlock(&mem_cont->lru_lock); >

Re: [-mm PATCH 4/9] Memory controller memory accounting (v4)

2007-07-30 Thread YAMAMOTO Takashi
atomic_inc(&mp->ref_cnt); > + res_counter_uncharge(&mem->res, 1); > + goto done; > + } i think you need css_put here. YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMA

Re: [PATCH 01/10] Task Containers(V11): Basic task container framework

2007-07-29 Thread YAMAMOTO Takashi
> +extern void container_init_smp(void); > +static inline void container_init_smp(void) {} stale prototypes? YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http:/

Re: [PATCH 01/10] Task Containers(V11): Basic task container framework

2007-07-26 Thread YAMAMOTO Takashi
members of the subsystem's top_container. It should > + be initialized to -1. stale info? > +struct container { > + struct containerfs_root *root; > + struct container *top_container; > +}; can cont->top_container be different from than &cont->root.top_

Re: [RFC][-mm PATCH 6/8] Memory controller add per container LRU and reclaim (v3)

2007-07-24 Thread YAMAMOTO Takashi
mp = list_entry(src->prev, struct meta_page, lru); > + page = mp->page; > + - is it safe to pick the lists without mem_cont->lru_lock held? - what prevents mem_container_uncharge from freeing this meta_page behind us? YAMAMOTO Takashi - To unsubscribe from this list

Re: [-mm PATCH 4/8] Memory controller memory accounting (v2)

2007-07-10 Thread YAMAMOTO Takashi
> On 7/10/07, YAMAMOTO Takashi <[EMAIL PROTECTED]> wrote: > > hi, > > > > > diff -puN mm/memory.c~mem-control-accounting mm/memory.c > > > --- linux-2.6.22-rc6/mm/memory.c~mem-control-accounting 2007-07-05 > > > 13:45:18.0 -07

Re: [-mm PATCH 6/8] Memory controller add per container LRU and reclaim (v2)

2007-07-10 Thread YAMAMOTO Takashi
extended to become > container aware. > > Signed-off-by: Balbir Singh <[EMAIL PROTECTED]> it seems that the number of pages to scan (nr_active/nr_inactive in shrink_zone) is calculated from NR_ACTIVE and NR_INACTIVE of the zone, even in the case of per-container reclaim. is it inten

Re: [-mm PATCH 4/8] Memory controller memory accounting (v2)

2007-07-10 Thread YAMAMOTO Takashi
goto oom; > + > entry = mk_pte(page, vma->vm_page_prot); > entry = maybe_mkwrite(pte_mkdirty(entry), vma); > ditto. can you check the rest of the patch by yourself? thanks. YAMAMOTO Takashi - To unsubscribe from this list: send the line "unsubscri

Re: [PATCH] /proc/cpumem

2005-02-16 Thread YAMAMOTO Takashi
if (found) { > + return p; > + } > + addr += PAGE_SIZE; > + } > + } doesn't this loop take very long time if you have a large hole? i'd suggest to change valid_phys_addr_range to fill &size even when it returns false, s