* [PATCH] mm: memcontrol: fix documentation for compound parameter
@ 2016-06-08 6:43 roy.qing.li
2016-06-08 7:21 ` Michal Hocko
2016-06-08 14:59 ` Johannes Weiner
0 siblings, 2 replies; 3+ messages in thread
From: roy.qing.li @ 2016-06-08 6:43 UTC (permalink / raw)
To: cgroups, linux-mm; +Cc: hannes, mhocko, vdavydov
From: Li RongQing <roy.qing.li@gmail.com>
commit f627c2f53786 ("memcg: adjust to support new THP refcounting")
adds a compound parameter for several functions, and change one as
compound for mem_cgroup_move_account but it does not change the
comments.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
mm/memcontrol.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index bc79b38..4d9a215 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4387,7 +4387,7 @@ static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
/**
* mem_cgroup_move_account - move account of the page
* @page: the page
- * @nr_pages: number of regular pages (>1 for huge pages)
+ * @compound: charge the page as compound or small page
* @from: mem_cgroup which the page is moved from.
* @to: mem_cgroup which the page is moved to. @from != @to.
*
@@ -5249,6 +5249,7 @@ bool mem_cgroup_low(struct mem_cgroup *root, struct mem_cgroup *memcg)
* @mm: mm context of the victim
* @gfp_mask: reclaim mode
* @memcgp: charged memcg return
+ * @compound: charge the page as compound or small page
*
* Try to charge @page to the memcg that @mm belongs to, reclaiming
* pages according to @gfp_mask if necessary.
@@ -5311,6 +5312,7 @@ out:
* @page: page to charge
* @memcg: memcg to charge the page to
* @lrucare: page might be on LRU already
+ * @compound: charge the page as compound or small page
*
* Finalize a charge transaction started by mem_cgroup_try_charge(),
* after page->mapping has been set up. This must happen atomically
@@ -5362,6 +5364,7 @@ void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg,
* mem_cgroup_cancel_charge - cancel a page charge
* @page: page to charge
* @memcg: memcg to charge the page to
+ * @compound: charge the page as compound or small page
*
* Cancel a charge transaction started by mem_cgroup_try_charge().
*/
--
2.1.4
--
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>
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] mm: memcontrol: fix documentation for compound parameter
2016-06-08 6:43 [PATCH] mm: memcontrol: fix documentation for compound parameter roy.qing.li
@ 2016-06-08 7:21 ` Michal Hocko
2016-06-08 14:59 ` Johannes Weiner
1 sibling, 0 replies; 3+ messages in thread
From: Michal Hocko @ 2016-06-08 7:21 UTC (permalink / raw)
To: roy.qing.li; +Cc: cgroups, linux-mm, hannes, vdavydov
On Wed 08-06-16 14:43:36, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> commit f627c2f53786 ("memcg: adjust to support new THP refcounting")
> adds a compound parameter for several functions, and change one as
> compound for mem_cgroup_move_account but it does not change the
> comments.
>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Michal Hocko <mhocko@suse.com>
> ---
> mm/memcontrol.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index bc79b38..4d9a215 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -4387,7 +4387,7 @@ static struct page *mc_handle_file_pte(struct vm_area_struct *vma,
> /**
> * mem_cgroup_move_account - move account of the page
> * @page: the page
> - * @nr_pages: number of regular pages (>1 for huge pages)
> + * @compound: charge the page as compound or small page
> * @from: mem_cgroup which the page is moved from.
> * @to: mem_cgroup which the page is moved to. @from != @to.
> *
> @@ -5249,6 +5249,7 @@ bool mem_cgroup_low(struct mem_cgroup *root, struct mem_cgroup *memcg)
> * @mm: mm context of the victim
> * @gfp_mask: reclaim mode
> * @memcgp: charged memcg return
> + * @compound: charge the page as compound or small page
> *
> * Try to charge @page to the memcg that @mm belongs to, reclaiming
> * pages according to @gfp_mask if necessary.
> @@ -5311,6 +5312,7 @@ out:
> * @page: page to charge
> * @memcg: memcg to charge the page to
> * @lrucare: page might be on LRU already
> + * @compound: charge the page as compound or small page
> *
> * Finalize a charge transaction started by mem_cgroup_try_charge(),
> * after page->mapping has been set up. This must happen atomically
> @@ -5362,6 +5364,7 @@ void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg,
> * mem_cgroup_cancel_charge - cancel a page charge
> * @page: page to charge
> * @memcg: memcg to charge the page to
> + * @compound: charge the page as compound or small page
> *
> * Cancel a charge transaction started by mem_cgroup_try_charge().
> */
> --
> 2.1.4
--
Michal Hocko
SUSE Labs
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mm: memcontrol: fix documentation for compound parameter
2016-06-08 6:43 [PATCH] mm: memcontrol: fix documentation for compound parameter roy.qing.li
2016-06-08 7:21 ` Michal Hocko
@ 2016-06-08 14:59 ` Johannes Weiner
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Weiner @ 2016-06-08 14:59 UTC (permalink / raw)
To: roy.qing.li; +Cc: cgroups, linux-mm, mhocko, vdavydov
On Wed, Jun 08, 2016 at 02:43:36PM +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> commit f627c2f53786 ("memcg: adjust to support new THP refcounting")
> adds a compound parameter for several functions, and change one as
> compound for mem_cgroup_move_account but it does not change the
> comments.
>
> Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Thanks, that's useful.
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-08 14:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-08 6:43 [PATCH] mm: memcontrol: fix documentation for compound parameter roy.qing.li
2016-06-08 7:21 ` Michal Hocko
2016-06-08 14:59 ` Johannes Weiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).