like this.
if (some size > limit)
ptr = kzalloc_node(...);
else {
prt = vmalloc_node(...)
vmalloced = 1;
}
if (ptr && vmalloced)
memset(prt, );
So if we will add kzalloc_node, we have to add vzalloc_node, too.
>
>> Can you switch that over as w
>
> Signed-off-by: Jesper Juhl
Reviewed-by: Minchan Kim
--
Kind regards,
Minchan Kim
___
Containers mailing list
contain...@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
_
On Sun, Oct 31, 2010 at 6:35 AM, Jesper Juhl wrote:
> Hi,
>
> We can avoid doing a memset in swap_cgroup_swapon() by using vzalloc().
>
>
> Signed-off-by: Jesper Juhl
Reviewed-by: Minchan Kim
There are so many placed need vzalloc.
Thanks, Jesper.
--
Kind re
r.
>
> This patch limits the return value of vm_dirty_param() considring
> global settings.
>
> Changelog:
> - fixed an argument "mem" int to u64
> - fixed to use global available memory to cap memcg's value.
>
> Signed-off-by: KAMEZAWA Hiroyuki
Reviewe
a 8G anon process.
>
> Before:
> real 0m0.792s
> user 0m0.000s
> sys 0m0.780s
>
> After:
> real 0m0.854s
> user 0m0.000s
> sys 0m0.842s
>
> This score is bad but planned patches for optimization can re
p *pc)
> {
> bit_spin_unlock(PCG_LOCK, &pc->flags);
> + local_bh_enable();
> }
>
> #else /* CONFIG_CGROUP_MEM_RES_CTLR */
> --
> 1.7.1
>
>
Please, see recent Kame's patch.
http://lkml.org/lkml/2010/10/15/54
--
Kind regards,
Minchan Kim
t;page);
> /*
> * check events
> */
>
>
Looks good to me.
But let me ask a question.
Why do only move_account need this logic?
Is deadlock candidate is only this place?
How about mem_cgroup_prepare_migration?
unmap_and_move
lock_page
mem_cgroup_prepare_migration
lock_page_cgroup
...
s
/* Ensure that we never return 0 */
> }
>
Just a nitpick.
You seem to like get_ name.
But I think it's a redundant and just makes function name longer
without any benefit.
In kernel, many place doesn't use get_xxx naming.
--
Kind regards,
Minchan Kim
On Wed, Oct 6, 2010 at 8:26 AM, Greg Thelen wrote:
> Minchan Kim writes:
>
>> On Sun, Oct 03, 2010 at 11:57:59PM -0700, Greg Thelen wrote:
>>> If pages are being migrated from a memcg, then updates to that
>>> memcg's page statistics are protected by
On Wed, Oct 6, 2010 at 4:59 AM, Greg Thelen wrote:
> Minchan Kim writes:
>
>> On Sun, Oct 03, 2010 at 11:57:58PM -0700, Greg Thelen wrote:
>>> Replace usage of the mem_cgroup_update_file_mapped() memcg
>>> statistic update routine with two new routines:
P] += val * PAGE_SIZE;
> }
>
> + val = mem_cgroup_read_stat(mem, MEM_CGROUP_STAT_FILE_DIRTY);
> + s->stat[MCS_FILE_DIRTY] += val * PAGE_SIZE;
> + val = mem_cgroup_read_stat(mem, MEM_CGROUP_STAT_FILE_WRITEBACK);
> + s->stat[MCS_WRITEBACK] +
t seems to make code very ugly.
2. So could you solve the problem in your design?
I mean you could update page state out of softirq?
(I didn't look at the your patches all. Sorry if I am missing something)
3. Normally, we have updated page state without disable irq.
Why does memcg ne
APPED, /* # of pages charged as file rss */
> +};
> +
mem_cgrou_"write"_page_stat_item?
Does "write" make sense to abstract page_state generally?
--
Kind regards,
Minchan Kim
___
Containers
On Fri, Feb 26, 2010 at 3:15 PM, KAMEZAWA Hiroyuki
wrote:
> On Fri, 26 Feb 2010 14:53:39 +0900
> Minchan Kim wrote:
>
>> On Fri, Feb 26, 2010 at 2:01 PM, KAMEZAWA Hiroyuki
>> wrote:
>> > Hi,
>> >
>> > On Fri, 26 Feb 2010 13:50:04 +0900
>> &g
On Fri, Feb 26, 2010 at 2:01 PM, KAMEZAWA Hiroyuki
wrote:
> Hi,
>
> On Fri, 26 Feb 2010 13:50:04 +0900
> Minchan Kim wrote:
>
>> > Hm ? I don't read the whole thread but can_attach() is called under
>> > cgroup_mutex(). So, it doesn't need to use RCU.
Hi, Kame.
On Fri, Feb 26, 2010 at 9:23 AM, KAMEZAWA Hiroyuki
wrote:
> On Fri, 26 Feb 2010 00:36:15 +0900
> Minchan Kim wrote:
>
>> Hi
>>
>> On Tue, Feb 23, 2010 at 8:58 PM, Andrea Righi wrote:
>> > On Mon, Feb 22, 2010 at 01:07:32PM -0500, Vivek Goy
; > + rcu_read_unlock();
>> > >
>> > > The rcu_read_lock() isn't protecting anything here.
>> >
>> > Right!
>>
>> Are we not protecting "memcg" pointer using rcu here?
>
> Vivek, you are right:
>
> mem_cgroup_from_t
essage to [EMAIL PROTECTED]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Kinds regards,
MinChan Kim
___
Containers mailing list
[EMAIL PROTECTED]
https://lists.lin
tx: checkpoint context
>> + * @ptr: pointer to object
>> + * @objref: unique identifier - object reference
>> + * @type: object type
>> + * @flags: object flags
>> + */
>> +int cr_obj_add_ref(struct cr_ctx *ctx, void *pt
+ __s16 ldt_entry_size;
> + __s16 nldt;
> +} __attribute__((aligned(8)));
> +
> #endif /* __ASM_X86_CKPT_HDR__H */
> diff --git a/include/linux/checkpoint.h b/include/linux/checkpoint.h
> index 5e53ae6..d74e64d 100644
> --- a/include/linux/checkpoint.h
ash table
> + - Better use of standard kmalloc/kfree
> +
> +[2008-Aug-09] v2:
> + - Added utsname->{release,version,machine} to checkpoint header
> + - Pad header structures to 64 bits to ensure compatibility
> + - Address comments from LKML and linux-containers mailing list
> +
> +[2008-Jul-29] v1:
> +In this incarnation, CR only works on single task. The address space
> +may consist of only private, simple VMAs - anonymous or file-mapped.
> +Both checkpoint and restart will ignore the first argument (pid/crid)
> +and instead act on themselves.
> --
> 1.5.4.3
>
> --
> 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://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Kinds regards,
MinChan Kim
___
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers
___
Devel mailing list
Devel@openvz.org
https://openvz.org/mailman/listinfo/devel
nd clean-ups
> +* Use standard hlist_... for hash table
> +* Better use of standard kmalloc/kfree
> +
> +[2008-Aug-09] v2:
> +* Added utsname->{release,version,machine} to checkpoint header
> +* Pad header structures to 64 bits to ensure compatibility
> +* Add
64-bit aligned: use padding for structure members, and use
> - * __attribute__ ((aligned (8))) for the entire structure.
> + * __attribute__((aligned(8))) for the entire structure.
> */
>
> /* records: generic header */
> @@ -42,6 +42,10 @@ enum {
>CR_HDR_VMA
Hi, Oren.
On Thu, Sep 11, 2008 at 3:36 AM, Oren Laadan <[EMAIL PROTECTED]> wrote:
>
>
> MinChan Kim wrote:
>> On Tue, Sep 9, 2008 at 4:42 PM, Oren Laadan <[EMAIL PROTECTED]> wrote:
>
> [...]
>
>>> +struct cr_ctx *cr_ctx_alloc(pid_t pid, int fd, u
one more thing.
On Wed, Sep 10, 2008 at 4:51 PM, MinChan Kim <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 9, 2008 at 4:42 PM, Oren Laadan <[EMAIL PROTECTED]> wrote:
>> For each VMA, there is a 'struct cr_vma'; if the VMA is file-mapped,
>> it will be followed
if /* _CHECKPOINT_CKPT_H_ */
> diff --git a/include/linux/ckpt_hdr.h b/include/linux/ckpt_hdr.h
> new file mode 100644
> index 000..dd05ecc
> --- /dev/null
> +++ b/include/linux/ckpt_hdr.h
> @@ -0,0 +1,84 @@
> +#ifndef _CHECKPOINT_CKPT_HDR_H_
> +#define _CHECKPOINT_CKPT_HDR_
8)));
>
> +struct cr_hdr_mm_context {
> + __s16 ldt_entry_size;
> + __s16 nldt;
> +} __attribute__((aligned(8)));
> +
> #endif /* __ASM_X86_CKPT_HDR__H */
> diff --git a/include/linux/ckpt.h b/include/linux/ckpt.h
> index 91f4998..5c62a90 100644
> --- a/inc
27 matches
Mail list logo