Re: [PATCH] Synchronize task mm counters on demand

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 22, 2018 at 6:09 PM, Daniel Colascione <dancol@xxxxxxxxxx> wrote:
Thanks for taking a look.

On Feb 22, 2018 6:01 PM, "Minchan Kim" <minchan@xxxxxxxxxx> wrote:
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index ad06d42adb1a..f8129afebbdd 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1507,14 +1507,28 @@ extern int mprotect_fixup(struct vm_area_struct *vma,
>   */
>  int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
>                         struct page **pages);
> +
> +#ifdef SPLIT_RSS_COUNTING
> +/* Flush all task-buffered MM counters to the mm */
> +void sync_mm_rss_all_users(struct mm_struct *mm);

Really heavy functioin iterates all of processes and threads.

Just all processes and the threads of each process attached to the mm. Maybe that's not much better.


Another option would be to maintain a list (with the list_head in the mm) of all the tasks with unflushed counters. This way, we at least wouldn't have to scan the world.

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux