All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: KAMEZAWA Hiroyuki
	<kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	YAMAMOTO Takashi
	<yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
Subject: Re: [PATCH][ just for review] memory controller enhancements [4/5] statistics for memory cgroup
Date: Tue, 16 Oct 2007 09:25:43 +0530	[thread overview]
Message-ID: <4714363F.5010101@linux.vnet.ibm.com> (raw)
In-Reply-To: <20071016120311.b1f8bb7d.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

KAMEZAWA Hiroyuki wrote:
> On Tue, 16 Oct 2007 07:38:23 +0900 (JST)
> yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org (YAMAMOTO Takashi) wrote:
> 
>>>>> +/*
>>>>> + * For batching....mem_cgroup_charge_statistics()(see below).
>>>>> + */
>>>>> +static inline void mem_cgroup_stat_add(struct mem_cgroup_stat *stat,
>>>>> +                enum mem_cgroup_stat_index idx, int val)
>>>>> +{
>>>>> +	int cpu = smp_processor_id();
>>>>> +	stat->cpustat[cpu].count[idx] += val;
>>>>> +}
>>>> i think the function name should be something which implies batching.
>>>>
>>> Hm, How about this ?
>>> ==
>>> mem_cgroup_stat_add_atomic() 
>>> ==
>>> and add this 
>>> ==
>>> VM_BUG_ON(preempt_count() == 0)
>>> ==
>> _atomic sounds like a different thing to me.  _nonpreemptible?
>>
> Hmm, ok.
> 
> Thanks,
> -Kame
> 

How about we call it __mem_cgroup_add_stat() and add a comment stating
that the routine should be called with pre-emption disabled?

We can also add the VM_BUG_ON() suggested.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

  parent reply	other threads:[~2007-10-16  3:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11  9:48 [PATCH][ just for review] memory controller enhancements [0/5] KAMEZAWA Hiroyuki
     [not found] ` <20071011184820.7c7301c9.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-11  9:51   ` [PATCH][ just for review] memory controller enhancements [1/5] force empty KAMEZAWA Hiroyuki
     [not found]     ` <20071011185128.63af3b74.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-16  0:15       ` YAMAMOTO Takashi
     [not found]         ` <20071016001549.298441BF482-Pcsii4f/SVk@public.gmane.org>
2007-10-16  6:32           ` KAMEZAWA Hiroyuki
2007-10-11  9:52   ` [PATCH][ just for review] memory controller enhancements [2/5] remember page cache KAMEZAWA Hiroyuki
2007-10-11  9:52   ` [PATCH][ just for review] memory controller enhancements [3/5] remember on which list patch KAMEZAWA Hiroyuki
2007-10-11  9:54   ` [PATCH][ just for review] memory controller enhancements [4/5] statistics for memory cgroup KAMEZAWA Hiroyuki
     [not found]     ` <20071011185422.42ec01f0.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-15  6:37       ` YAMAMOTO Takashi
     [not found]         ` <20071015063702.163181BF45C-Pcsii4f/SVk@public.gmane.org>
2007-10-15  6:46           ` KAMEZAWA Hiroyuki
     [not found]             ` <20071015154603.050d43f6.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-15 22:38               ` YAMAMOTO Takashi
     [not found]                 ` <20071015223823.573411BF4D9-Pcsii4f/SVk@public.gmane.org>
2007-10-16  3:03                   ` KAMEZAWA Hiroyuki
     [not found]                     ` <20071016120311.b1f8bb7d.kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2007-10-16  3:55                       ` Balbir Singh [this message]
     [not found]                         ` <4714363F.5010101-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2007-10-16  4:33                           ` KAMEZAWA Hiroyuki
2007-10-11  9:55   ` [PATCH][ just for review] memory controller enhancements [5/5] memory.stat file KAMEZAWA Hiroyuki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4714363F.5010101@linux.vnet.ibm.com \
    --to=balbir-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
    --cc=yamamoto-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.