linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ashish Mhetre <amhetre@nvidia.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: vdumpa@nvidia.com, mcgrof@kernel.org, keescook@chromium.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org, Snikam@nvidia.com,
	avanbrunt@nvidia.com
Subject: Re: [PATCH] mm: Expose lazy vfree pages to control via sysctl
Date: Mon, 21 Jan 2019 13:36:00 +0530	[thread overview]
Message-ID: <27bd8776-87fa-69ad-7b6e-4425251b5e9c@nvidia.com> (raw)
In-Reply-To: <a7bb656a-c815-09a4-69fc-bb9e7427cfa6@nvidia.com>

The issue is not seen on new kernel. This patch won't be needed. Thanks.

On 06/01/19 2:12 PM, Ashish Mhetre wrote:
> Matthew, this issue was last reported in September 2018 on K4.9.
> I verified that the optimization patches mentioned by you were not 
> present in our downstream kernel when we faced the issue. I will check 
> whether issue still persist on new kernel with all these patches and 
> come back.
> 
> On 04/01/19 11:33 PM, Matthew Wilcox wrote:
>> On Fri, Jan 04, 2019 at 09:05:41PM +0530, Ashish Mhetre wrote:
>>> From: Hiroshi Doyu <hdoyu@nvidia.com>
>>>
>>> The purpose of lazy_max_pages is to gather virtual address space till it
>>> reaches the lazy_max_pages limit and then purge with a TLB flush and 
>>> hence
>>> reduce the number of global TLB flushes.
>>> The default value of lazy_max_pages with one CPU is 32MB and with 4 
>>> CPUs it
>>> is 96MB i.e. for 4 cores, 96MB of vmalloc space will be gathered 
>>> before it
>>> is purged with a TLB flush.
>>> This feature has shown random latency issues. For example, we have seen
>>> that the kernel thread for some camera application spent 30ms in
>>> __purge_vmap_area_lazy() with 4 CPUs.
>>
>> You're not the first to report something like this.  Looking through the
>> kernel logs, I see:
>>
>> commit 763b218ddfaf56761c19923beb7e16656f66ec62
>> Author: Joel Fernandes <joelaf@google.com>
>> Date:   Mon Dec 12 16:44:26 2016 -0800
>>
>>      mm: add preempt points into __purge_vmap_area_lazy()
>>
>> commit f9e09977671b618aeb25ddc0d4c9a84d5b5cde9d
>> Author: Christoph Hellwig <hch@lst.de>
>> Date:   Mon Dec 12 16:44:23 2016 -0800
>>
>>      mm: turn vmap_purge_lock into a mutex
>>
>> commit 80c4bd7a5e4368b680e0aeb57050a1b06eb573d8
>> Author: Chris Wilson <chris@chris-wilson.co.uk>
>> Date:   Fri May 20 16:57:38 2016 -0700
>>
>>      mm/vmalloc: keep a separate lazy-free list
>>
>> So the first thing I want to do is to confirm that you see this problem
>> on a modern kernel.  We've had trouble with NVidia before reporting
>> historical problems as if they were new.
>>

WARNING: multiple messages have this Message-ID
From: Ashish Mhetre <amhetre@nvidia.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: <vdumpa@nvidia.com>, <mcgrof@kernel.org>, <keescook@chromium.org>,
	<linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	<linux-tegra@vger.kernel.org>, <Snikam@nvidia.com>,
	<avanbrunt@nvidia.com>
Subject: Re: [PATCH] mm: Expose lazy vfree pages to control via sysctl
Date: Mon, 21 Jan 2019 13:36:00 +0530	[thread overview]
Message-ID: <27bd8776-87fa-69ad-7b6e-4425251b5e9c@nvidia.com> (raw)
Message-ID: <20190121080600.zz3E156j9qghfw85l9HrSyigYnCU7-GdTId1yTG0FEw@z> (raw)
In-Reply-To: <a7bb656a-c815-09a4-69fc-bb9e7427cfa6@nvidia.com>

The issue is not seen on new kernel. This patch won't be needed. Thanks.

On 06/01/19 2:12 PM, Ashish Mhetre wrote:
> Matthew, this issue was last reported in September 2018 on K4.9.
> I verified that the optimization patches mentioned by you were not 
> present in our downstream kernel when we faced the issue. I will check 
> whether issue still persist on new kernel with all these patches and 
> come back.
> 
> On 04/01/19 11:33 PM, Matthew Wilcox wrote:
>> On Fri, Jan 04, 2019 at 09:05:41PM +0530, Ashish Mhetre wrote:
>>> From: Hiroshi Doyu <hdoyu@nvidia.com>
>>>
>>> The purpose of lazy_max_pages is to gather virtual address space till it
>>> reaches the lazy_max_pages limit and then purge with a TLB flush and 
>>> hence
>>> reduce the number of global TLB flushes.
>>> The default value of lazy_max_pages with one CPU is 32MB and with 4 
>>> CPUs it
>>> is 96MB i.e. for 4 cores, 96MB of vmalloc space will be gathered 
>>> before it
>>> is purged with a TLB flush.
>>> This feature has shown random latency issues. For example, we have seen
>>> that the kernel thread for some camera application spent 30ms in
>>> __purge_vmap_area_lazy() with 4 CPUs.
>>
>> You're not the first to report something like this.  Looking through the
>> kernel logs, I see:
>>
>> commit 763b218ddfaf56761c19923beb7e16656f66ec62
>> Author: Joel Fernandes <joelaf@google.com>
>> Date:   Mon Dec 12 16:44:26 2016 -0800
>>
>>      mm: add preempt points into __purge_vmap_area_lazy()
>>
>> commit f9e09977671b618aeb25ddc0d4c9a84d5b5cde9d
>> Author: Christoph Hellwig <hch@lst.de>
>> Date:   Mon Dec 12 16:44:23 2016 -0800
>>
>>      mm: turn vmap_purge_lock into a mutex
>>
>> commit 80c4bd7a5e4368b680e0aeb57050a1b06eb573d8
>> Author: Chris Wilson <chris@chris-wilson.co.uk>
>> Date:   Fri May 20 16:57:38 2016 -0700
>>
>>      mm/vmalloc: keep a separate lazy-free list
>>
>> So the first thing I want to do is to confirm that you see this problem
>> on a modern kernel.  We've had trouble with NVidia before reporting
>> historical problems as if they were new.
>>


  parent reply	other threads:[~2019-01-21  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-04 15:35 Ashish Mhetre
2019-01-04 15:35 ` Ashish Mhetre
2019-01-04 18:03 ` Matthew Wilcox
2019-01-06  8:42   ` Ashish Mhetre
2019-01-06  8:42     ` Ashish Mhetre
2019-01-21  8:06     ` Ashish Mhetre [this message]
2019-01-21  8:06       ` Ashish Mhetre
2019-01-04 18:29 ` kbuild test robot
2019-01-04 18:29   ` kbuild test robot
2019-01-04 18:30 ` kbuild test robot
2019-01-04 18:30   ` kbuild test robot

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=27bd8776-87fa-69ad-7b6e-4425251b5e9c@nvidia.com \
    --to=amhetre@nvidia.com \
    --cc=Snikam@nvidia.com \
    --cc=avanbrunt@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=vdumpa@nvidia.com \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox