linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sha Zhengju <handai.szj@gmail.com>
To: Greg Thelen <gthelen@google.com>
Cc: Michal Hocko <mhocko@suse.cz>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	Cgroups <cgroups@vger.kernel.org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Wu Fengguang <fengguang.wu@intel.com>,
	Mel Gorman <mgorman@suse.de>, Sha Zhengju <handai.szj@taobao.com>
Subject: Re: [PATCH V4 5/6] memcg: patch mem_cgroup_{begin,end}_update_page_stat() out if only root memcg exists
Date: Tue, 16 Jul 2013 12:26:38 +0800	[thread overview]
Message-ID: <CAFj3OHX5cRZTyi-xXJHGOrkE8CbnJ0KFkEfB3FUuOr7bk+fWWQ@mail.gmail.com> (raw)
In-Reply-To: <CAHH2K0avjz=H8k2zo-P-QJt=9f61GoAmq+ceECzGNxdUx1PWbA@mail.gmail.com>

On Tue, Jul 16, 2013 at 1:58 AM, Greg Thelen <gthelen@google.com> wrote:
> On Thu, Jul 11, 2013 at 7:56 AM, Michal Hocko <mhocko@suse.cz> wrote:
>> On Sat 06-07-13 01:33:43, Sha Zhengju wrote:
>>> From: Sha Zhengju <handai.szj@taobao.com>
>>>
>>> If memcg is enabled and no non-root memcg exists, all allocated
>>> pages belongs to root_mem_cgroup and wil go through root memcg
>>> statistics routines.  So in order to reduce overheads after adding
>>> memcg dirty/writeback accounting in hot paths, we use jump label to
>>> patch mem_cgroup_{begin,end}_update_page_stat() in or out when not
>>> used.
>>
>> I do not think this is enough. How much do you save? One atomic read.
>> This doesn't seem like a killer.
>
> Given we're already using mem_cgroup_{begin,end}_update_page_stat(),
> this optimization seems independent of memcg dirty/writeback
> accounting.  Does this patch help memcg even before dirty/writeback
> accounting?  If yes, then we have the option of splitting this
> optimization out of the series.

Set_page_dirty is a hot path, people said I should be careful to the
overhead of adding a new counting, and the optimization is a must
before merging.
But since we have more need of this feature now, if it's blocking
something, I'm willing to split it.

--
Thanks,
Sha

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-07-16  4:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 17:18 [PATCH V4 0/6] Memcg dirty/writeback page accounting Sha Zhengju
2013-07-05 17:21 ` [PATCH V4 1/6] memcg: remove MEMCG_NR_FILE_MAPPED Sha Zhengju
2013-07-11 13:39   ` Michal Hocko
2013-07-11 15:53     ` Sha Zhengju
2013-07-05 17:26 ` [PATCH V4 2/6] fs/ceph: vfs __set_page_dirty_nobuffers interface instead of doing it inside filesystem Sha Zhengju
2013-07-05 17:30 ` [PATCH V4 3/6] memcg: add per cgroup dirty pages accounting Sha Zhengju
2013-07-11 14:31   ` Michal Hocko
2013-07-11 16:49     ` Sha Zhengju
2013-07-05 17:32 ` [PATCH V4 4/6] memcg: add per cgroup writeback " Sha Zhengju
2013-07-11 14:40   ` Michal Hocko
2013-07-11 16:56     ` Sha Zhengju
2013-07-05 17:33 ` [PATCH V4 5/6] memcg: patch mem_cgroup_{begin,end}_update_page_stat() out if only root memcg exists Sha Zhengju
2013-07-11 14:56   ` Michal Hocko
2013-07-12 12:59     ` Sha Zhengju
2013-07-12 13:13       ` Sha Zhengju
2013-07-15  6:32         ` Glauber Costa
2013-07-12 13:25       ` Michal Hocko
2013-07-13  4:15         ` Sha Zhengju
2013-07-15 17:58     ` Greg Thelen
2013-07-16  4:26       ` Sha Zhengju [this message]
2013-07-05 17:34 ` [PATCH V4 6/6] memcg: Document cgroup dirty/writeback memory statistics Sha Zhengju

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=CAFj3OHX5cRZTyi-xXJHGOrkE8CbnJ0KFkEfB3FUuOr7bk+fWWQ@mail.gmail.com \
    --to=handai.szj@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=fengguang.wu@intel.com \
    --cc=gthelen@google.com \
    --cc=handai.szj@taobao.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox