From: zhiguojiang <justinjiang@vivo.com>
To: David Hildenbrand <david@redhat.com>,
Matthew Wilcox <willy@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
opensource.kernel@vivo.com
Subject: Re: [PATCH v2 1/2] mm:vmscan: the dirty folio in folio_list skip unmap
Date: Wed, 25 Oct 2023 23:37:53 +0800 [thread overview]
Message-ID: <3dea1c2e-6aec-4b8b-854d-b671cff98a64@vivo.com> (raw)
In-Reply-To: <8894fd17-bfa2-4683-a908-f451c940a901@vivo.com>
在 2023/10/24 15:21, zhiguojiang 写道:
>
>
> 在 2023/10/24 15:07, David Hildenbrand 写道:
>> On 24.10.23 04:04, zhiguojiang wrote:
>>>
>>>
>>> 在 2023/10/23 21:01, Matthew Wilcox 写道:
>>>> On Mon, Oct 23, 2023 at 08:44:55PM +0800, zhiguojiang wrote:
>>>>> 在 2023/10/23 20:21, Matthew Wilcox 写道:
>>>>>> On Mon, Oct 23, 2023 at 04:07:28PM +0800, zhiguojiang wrote:
>>>>>>>> Are you seeing measurable changes for any workloads? It
>>>>>>>> certainly seems
>>>>>>>> like you should, but it would help if you chose a test from
>>>>>>>> mmtests and
>>>>>>>> showed how performance changed on your system.
>>>>>>> In one mmtest, the max times for a invalid recyling of a
>>>>>>> folio_list dirty
>>>>>>> folio that does not support pageout and has been activated in
>>>>>>> shrink_folio_list() are: cost=51us, exe=2365us.
>>>>>>>
>>>>>>> Calculate according to this formula: dirty_cost / total_cost *
>>>>>>> 100%, the
>>>>>>> recyling efficiency of dirty folios can be improved 53.13%、82.95%.
>>>>>>>
>>>>>>> So this patch can optimize shrink efficiency and reduce the
>>>>>>> workload of
>>>>>>> kswapd to a certain extent.
>>>>>>>
>>>>>>> kswapd0-96 ( 96) [005] ..... 387.218548:
>>>>>>> mm_vmscan_lru_shrink_inactive: [Justin] nid 0 nr_scanned 32
>>>>>>> nr_taken 32
>>>>>>> nr_reclaimed 31 nr_dirty 1 nr_unqueued_dirty 1 nr_writeback 0
>>>>>>> nr_activate[1] 1 nr_ref_keep 0 f RECLAIM_WB_FILE|RECLAIM_WB_ASYNC
>>>>>>> total_cost 96 total_exe 2365 dirty_cost 51 total_exe 2365
>>>>>>>
>>>>>>> kswapd0-96 ( 96) [006] ..... 412.822532:
>>>>>>> mm_vmscan_lru_shrink_inactive: [Justin] nid 0 nr_scanned 32
>>>>>>> nr_taken 32
>>>>>>> nr_reclaimed 0 nr_dirty 32 nr_unqueued_dirty 32 nr_writeback 0
>>>>>>> nr_activate[1] 19 nr_ref_keep 13 f RECLAIM_WB_FILE|RECLAIM_WB_ASYNC
>>>>>>> total_cost 88 total_exe 605 dirty_cost 73 total_exe 605
>>>>>> I appreciate that you can put probes in and determine the cost,
>>>>>> but do
>>>>>> you see improvements for a real workload? Like doing a kernel
>>>>>> compile
>>>>>> -- does it speed up at all?
>>>>> Can you help share a method for testing thread workload, like kswapd?
>>>> Something dirt simple like 'time make -j8'.
>>> Two compilations were conducted separately, and compared to the
>>> unmodified compilation,
>>> the compilation time for adding modified patches had a certain
>>> reduction, as follows:
>>>
>>> Compilation command:
>>> make distclean -j8
>>> make ARCH=x86_64 x86_64_defconfig
>>> time make -j8
>>>
>>> 1.Unmodified Compilation time:
>>> real 2m40.276s
>>> user 16m2.956s
>>> sys 2m14.738s
>>>
>>> real 2m40.136s
>>> user 16m2.617s
>>> sys 2m14.722s
>>>
>>> 2.[Patch v2 1/2] Modified Compilation time:
>>> real 2m40.067s
>>> user 16m3.164s
>>> sys 2m14.211s
>>>
>>> real 2m40.123s
>>> user 16m2.439s
>>> sys 2m14.508s
>>>
>>> 3 [Patch v2 1/2] + [Patch v2 2/2] Modified Compilation time:
>>> real 2m40.367s
>>> user 16m3.738s
>>> sys 2m13.662s
>>>
>>> real 2m40.014s
>>> user 16m3.108s
>>> sys 2m14.096s
>>>
>>
>> To get expressive numbers two iterations are usually not sufficient.
>> How much memory does you system have? Does vmscan even ever get active?
> Test system memory: MemTotal: 8161608 kB. When multiple Apps were
> opened, vmscan can get active. I can capture a lot of tracelog data
> through testing, I only posted two sets of tracelog data.
Hi, please help to continue reviewing this path and draw a conclusion on
whether it can be merged. Thanks.
>
>
next prev parent reply other threads:[~2023-10-25 15:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-19 13:14 [PATCH v2 0/2] mm: the dirty folio unmap redundantly Zhiguo Jiang
2023-10-19 13:14 ` [PATCH v2 1/2] mm:vmscan: the dirty folio in folio_list skip unmap Zhiguo Jiang
2023-10-19 14:15 ` David Hildenbrand
2023-10-20 3:59 ` zhiguojiang
2023-10-20 4:09 ` zhiguojiang
2023-10-20 4:15 ` Matthew Wilcox
2023-10-20 4:36 ` zhiguojiang
2023-10-23 8:07 ` zhiguojiang
2023-10-23 12:21 ` Matthew Wilcox
2023-10-23 12:44 ` zhiguojiang
2023-10-23 13:01 ` Matthew Wilcox
2023-10-24 2:04 ` zhiguojiang
2023-10-24 7:07 ` David Hildenbrand
2023-10-24 7:21 ` zhiguojiang
2023-10-25 15:37 ` zhiguojiang [this message]
2023-10-24 2:08 ` zhiguojiang
2023-10-19 13:14 ` [PATCH v2 2/2] mm:vmscan: the ref clean dirty folio " Zhiguo Jiang
2023-10-19 13:42 [PATCH v2 0/2] mm: the dirty folio unmap redundantly Zhiguo Jiang
2023-10-19 13:42 ` [PATCH v2 1/2] mm:vmscan: the dirty folio in folio list skip unmap Zhiguo Jiang
2023-11-06 21:35 ` Andrew Morton
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=3dea1c2e-6aec-4b8b-854d-b671cff98a64@vivo.com \
--to=justinjiang@vivo.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=opensource.kernel@vivo.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
all inboxes | Powered by JetHome®