[Devel] Re: [RFC][PATCH] memory controller per zone patches take 2 [4/10] calculate mapped ratio for memory cgroup

2007-11-22 Thread KAMEZAWA Hiroyuki
On Thu, 22 Nov 2007 17:34:20 +0900 (JST) [EMAIL PROTECTED] (YAMAMOTO Takashi) wrote: + /* usage is recorded in bytes */ + total = mem-res.usage PAGE_SHIFT; + rss = mem_cgroup_read_stat(mem-stat, MEM_CGROUP_STAT_RSS); + return (rss * 100) / total;

[Devel] Re: [RFC][PATCH] memory controller per zone patches take 2 [4/10] calculate mapped ratio for memory cgroup

2007-11-22 Thread YAMAMOTO Takashi
On Thu, 22 Nov 2007 17:34:20 +0900 (JST) [EMAIL PROTECTED] (YAMAMOTO Takashi) wrote: + /* usage is recorded in bytes */ + total = mem-res.usage PAGE_SHIFT; + rss = mem_cgroup_read_stat(mem-stat, MEM_CGROUP_STAT_RSS); + return (rss * 100) / total;

[Devel] Re: [PATCH] proc: use BUG_ON() in de_put()

2007-11-22 Thread Alexey Dobriyan
On Fri, Nov 16, 2007 at 01:46:42PM -0800, Andrew Morton wrote: On Thu, 15 Nov 2007 19:12:49 +0300 Alexey Dobriyan [EMAIL PROTECTED] wrote: It's much more visible that some printk. I still has an unexplained oops in proc, so let's leave it for a while. --- a/fs/proc/inode.c +++

[Devel] Re: [RFC] [PATCH] memory controller background reclamation

2007-11-22 Thread YAMAMOTO Takashi
We could add the following API to resource counters res_counter_set_low_watermark res_counter_set_high_watermark res_counter_below_low_watermark res_counter_above_high_watermark and add low_watermark high_watermark members to the resource group. We could

[Devel] Re: [PATCH][IRDA] Compilation for CONFIG_INET=n case

2007-11-22 Thread Herbert Xu
On Wed, Nov 21, 2007 at 07:03:16PM +0300, Pavel Emelyanov wrote: Found this occasionally. The CONFIG_INET=n is hardly ever set, but if it is the irlan_eth_send_gratuitous_arp() compilation should produce a warning about unused variable in_dev. Too pedantic? :) Signed-off-by: Pavel

[Devel] [PATCH][UNIX] Move the unix sock iterators in to proper place

2007-11-22 Thread Pavel Emelyanov
The first_unix_socket() and next_unix_sockets() are now used in proc file and in forall_unix_socets macro only. The forall_unix_sockets is not used in this file at all so remove it. After this move the helpers to where they really belong, i.e. closer to proc code under the #ifdef CONFIG_PROC_FS

[Devel] Re: Re: [RFC][PATCH] memory controller per zone patches take 2 [4/10] calculate mapped ratio for memory cgroup

2007-11-22 Thread kamezawa . hiroyu
Ah, This is what I do now. == +/* + * Calculate mapped_ratio under memory controller. This will be used in + * vmscan.c for deteremining we have to reclaim mapped pages. + */ +int mem_cgroup_calc_mapped_ratio(struct mem_cgroup *mem) +{ + long total, rss; + + /* +*

[Devel] Re: Re: [RFC] [PATCH] memory controller background reclamation

2007-11-22 Thread kamezawa . hiroyu
here's a new version. Thank you. I'll review and try to merge yours in the next week, Regards, -Kame ___ Containers mailing list [EMAIL PROTECTED] https://lists.linux-foundation.org/mailman/listinfo/containers

[Devel] [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-22 Thread Pierre Peiffer
Each ipc_namespace contains a table of 3 pointers to struct ipc_ids (3 for msg, sem and shm, structure used to store all ipcs) These 'struct ipc_ids' are dynamically allocated for each icp_namespace as the ipc_namespace itself (for the init namespace, they are initialized with pointers to static

[Devel] [PATCH][SHMEM] Factor out sbi-free_inodes manipulations

2007-11-22 Thread Pavel Emelyanov
The shmem_sb_info structure has a number of free_inodes. This value is altered in appropriate places under spinlock and with the sbi-max_inodes != 0 check. Consolidate these manipulations into two helpers. This is minus 30 bytes of shmem.o and minus 4 :) lines of code. Signed-off-by: Pavel

[Devel] Re: [RFC] [PATCH] memory controller background reclamation

2007-11-22 Thread Balbir Singh
YAMAMOTO Takashi wrote: changes from the previous: - rebase to linux-2.6.24-rc2-mm1 + kamezawa patchset. - create workqueue when setting high watermark, rather than cgroup creation which is earlier on boot. YAMAMOTO Takashi Signed-off-by: YAMAMOTO Takashi [EMAIL PROTECTED] ---

[Devel] Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-22 Thread Cedric Le Goater
Pierre Peiffer wrote: Each ipc_namespace contains a table of 3 pointers to struct ipc_ids (3 for msg, sem and shm, structure used to store all ipcs) These 'struct ipc_ids' are dynamically allocated for each icp_namespace as the ipc_namespace itself (for the init namespace, they are

[Devel] Re: [PATCH 2.6.24-rc3-mm1] IPC: make struct ipc_ids static in ipc_namespace

2007-11-22 Thread Pavel Emelyanov
Cedric Le Goater wrote: Pierre Peiffer wrote: Each ipc_namespace contains a table of 3 pointers to struct ipc_ids (3 for msg, sem and shm, structure used to store all ipcs) These 'struct ipc_ids' are dynamically allocated for each icp_namespace as the ipc_namespace itself (for the init