[PATCH 10/10] memcg: check memcg dirty limits in page writeback

Minchan Kim minchan.kim at gmail.com
Tue Oct 5 17:32:29 PDT 2010


On Mon, Oct 4, 2010 at 3:58 PM, Greg Thelen <gthelen at google.com> wrote:
> If the current process is in a non-root memcg, then
> global_dirty_limits() will consider the memcg dirty limit.
> This allows different cgroups to have distinct dirty limits
> which trigger direct and background writeback at different
> levels.
>
> Signed-off-by: Andrea Righi <arighi at develer.com>
> Signed-off-by: Greg Thelen <gthelen at google.com>
> ---
>  mm/page-writeback.c |   87 ++++++++++++++++++++++++++++++++++++++++++---------
>  1 files changed, 72 insertions(+), 15 deletions(-)
>
> diff --git a/mm/page-writeback.c b/mm/page-writeback.c
> index a0bb3e2..c1db336 100644
> --- a/mm/page-writeback.c
> +++ b/mm/page-writeback.c
> @@ -180,7 +180,7 @@ static unsigned long highmem_dirtyable_memory(unsigned long total)
>  * Returns the numebr of pages that can currently be freed and used
>  * by the kernel for direct mappings.
>  */
> -static unsigned long determine_dirtyable_memory(void)
> +static unsigned long get_global_dirtyable_memory(void)
>  {
>        unsigned long x;
>
> @@ -192,6 +192,58 @@ static unsigned long determine_dirtyable_memory(void)
>        return x + 1;   /* Ensure that we never return 0 */
>  }
>

Just a nitpick.
You seem to like get_xxxx 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


More information about the Containers mailing list