From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0693D0BB66 for ; Thu, 24 Oct 2024 07:45:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C6EC6B007B; Thu, 24 Oct 2024 03:45:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 550EF6B0088; Thu, 24 Oct 2024 03:45:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3F22E6B0089; Thu, 24 Oct 2024 03:45:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 1ADBB6B007B for ; Thu, 24 Oct 2024 03:45:14 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 47791C1142 for ; Thu, 24 Oct 2024 07:44:54 +0000 (UTC) X-FDA: 82707709266.13.F5BAC4F Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by imf29.hostedemail.com (Postfix) with ESMTP id 9238E120008 for ; Thu, 24 Oct 2024 07:44:47 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=leemhuis.info header.s=he214686 header.b=ZN8cB5Sx; spf=pass (imf29.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729755835; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=x7zQv6WLWCBckv+xucBTETL7MnDWTDn514ggvPhcUaw=; b=TCOLWajZL10blp73HkB92HDZ8D/Sg0xEWWN9d94WQ8LeWpUhjyIKXVSXPY7ynL+NWinZ2l uzlOEMZL+49PRHTwNyJhmIageUQb3sr+fd0VqwnFzB7NqJhiNj7M8p9ntby+AIPwoob2SY DZb8hTPJ2jr+wspjNU1p1jrK/K+36r8= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=leemhuis.info header.s=he214686 header.b=ZN8cB5Sx; spf=pass (imf29.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729755835; a=rsa-sha256; cv=none; b=6M2MpB9oKM67ruTSSz37dmP4MgL6iIUj2sWw6B1DHxOQza7lz+FJojasE/R4SQZNCRKdjD DVy/5nY644jv6qsMraUkY+Vd4709EH/CEZz0Rmz7N0s0ZzEMXr3PaIxZTyHVfPbwBaPfir 6y9cLoEJaaZWShRTBoF5UzunxYR22rs= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=leemhuis.info; s=he214686; h=Content-Transfer-Encoding:Content-Type:To:Cc: Subject:From:MIME-Version:Date:Message-ID:From:Sender:Reply-To:Subject:Date: Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=x7zQv6WLWCBckv+xucBTETL7MnDWTDn514ggvPhcUaw=; t=1729755912; x=1730187912; b=ZN8cB5SxtutMLi0SviT+CF2r5rqsCqKCXgIHfmyVgCYhLOCnBegx7NZ7T9ssZSrtJ8jB7hlJxf M0f3bFgdD5ibpvvKEZA0YOS0BNX1TYybOqQk22z/CGJwZk89tB57X66HnU2iml2zzj1JGIGRm3dwf viXdugBob47JboosJnjYnUgwM8Aubuj/cXj8ou0gGEEcWLFgvXnf4bnb+0ZuTQVX4KkxMmDuyGzvI vnTv4VymXyvDvsFtDPuLzG0lfPgg5iTfOyqyTu2o9GDijn/+mxu3UM4lNpYqozGDzQ3Gd7zabtT2m eriIZneqP8vA8Fdzp6UYNO6Wc8FxBc+WwVpsg==; Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1t3sWq-00086o-F3; Thu, 24 Oct 2024 09:45:08 +0200 Message-ID: <2050f0d4-57b0-481d-bab8-05e8d48fed0c@leemhuis.info> Date: Thu, 24 Oct 2024 09:45:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Thorsten Leemhuis Subject: darktable performance regression on AMD systems caused by "mm: align larger anonymous mappings on THP boundaries" Content-Language: en-US, de-DE Cc: Matthias , Andrew Morton , Linux kernel regressions list , LKML , Linux-MM , Yang Shi To: Rik van Riel Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1729755912;57d64afe; X-HE-SMSGID: 1t3sWq-00086o-F3 X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 9238E120008 X-Stat-Signature: 7gddtui9cncf3osmxfkapbxrcijjs6em X-HE-Tag: 1729755887-243033 X-HE-Meta: U2FsdGVkX18bG7aqzoRWu8T/EqUWTSXtj2ddEbFzLeZ9BM+49UL3ZMOHpDBMN19vK1fIZgPFfYOOrGcxk4KHnGC8UKDDYerZktBboQ/xpIKx2QE/6ZeobMae+NGq7VuRpRlExw4r2+hnb8hYXOXTge2SjCDsEcYIaF/Z7cCfSMWE1pImO1GXfpoS2saKMWuqDVJMcfSrOsjHHfFDFvKu3j09ENjHvreWUAsJZXmG0x/l0r1gpL2Y0C73tCZmxuqfXYqK9PGvFB5FXTFkZhyAmNmXtpGrsmc2k59g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ESpaxu/5gV5Jm5yeW6i07/ZuWffidkV/RP2UuN0oeUUmi68RKzH1O7F6s4o1cqCTY7t1lKiERGGF+eMDl+Da8YSjtk422F9NgioCLSNaG/dSiv8d+d32nRMo6IzUhDU8ziR4jKha52b6iziKz8RtgBlf2Bnzo/U8xluOqACjZlgMygu391RpER5rUR2z+dzpQjFdXQ/A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, Thorsten here, the Linux kernel's regression tracker. Rik, I noticed a report about a regression in bugzilla.kernel.org that appears to be caused by the following change of yours: efa7df3e3bb5da ("mm: align larger anonymous mappings on THP boundaries") [v6.7] It might be one of those "some things got faster, a few things became slower" situations. Not sure. Felt odd that the reporter was able to reproduce it on two AMD systems, but not on a Intel system. Maybe there is a bug somewhere else that was exposed by this. So in the end it felt worth forwarding by mail to me. Not tracking this yet, first waiting for feedback. To quote from https://bugzilla.kernel.org/show_bug.cgi?id=219366 : > Matthias 2024-10-09 05:37:51 UTC > > I am using a darktable benchmark and I am finding that RAW-to-JPG > conversion is about 15-25 % slower with kernels 6.7-6.10. The last > fast kernel series is 6.6. I also tested kernel series 6.5 and it is > as fast as 6.6 > > I know this sounds weird. What has darktable to do with the kernel? > But the numbers are true. And the darktable devs tell me that this > is a kernel regression. The darktable github issue is: https:// > github.com/darktable-org/darktable/issues/17397 You can find more > details there. > > What do I do to measure the performance? > > I am executing darktable on the command line. opencl is disabled so > that all activities are only on the CPU: > > darktable-cli bench.SRW /tmp/test.jpg --core --disable-opencl -d > perf -d opencl --configdir /tmp > > ( bench.SRW and the sidecar file can be found here: https:// > drive.google.com/drive/folders/1cfV2b893JuobVwGiZXcaNv5-yszH6j-N ) > > This will show some debug output. The line to look for is > > 4,2765 [dev_process_export] pixel pipeline processing took 3,811 > secs (81,883 CPU) > > This gives an exact number how much time darktable needed to convert > the image. The time darktable needs has a clear dependency on the > kernel version. It is fast with kernel 6.6. and older and slow with > kernel 6.7 and newer. Something must have happened from 6.6 to 6.7 > which slows down darktable. > > The darktable debug output shows that basically only one module is > responsible for the slow down: 'atrous' > > with kernel 6.6.47: > > 4,0548 [dev_pixelpipe] took 0,635 secs (14,597 CPU) [export] > processed 'atrous' on CPU, blended on CPU ... 4,2765 > [dev_process_export] pixel pipeline processing took 3,811 secs > (81,883 CPU) > > with kernel 6.10.6: > > 4,9645 [dev_pixelpipe] took 1,489 secs (33,736 CPU) [export] > processed 'atrous' on CPU, blended on CPU ... 5,2151 > [dev_process_export] pixel pipeline processing took 4,773 secs > (102,452 CPU) > > > This is also being discussed here: https://discuss.pixls.us/t/ > darktable-performance-regression-with-kernel-6-7-and-newer/45945/1 > And other users confirm the performance degradation. [...] > This seems to affect AMD only. I reproduced this performance > degradation on two different Ryzen Desktop PCs (Ryzen 5 and Ryzen > 9). But I can not reproduce it on my Intel PC (Lenovo X1 Carbon, > core i5). [...] > By the way, there is also a thread in the darktable forum on this topic: > https://discuss.pixls.us/t/darktable-performance-regression-with-kernel-6-7-and-newer/45945 > > Some users reproduced it there as well. See the ticket for more details. The reporter is CCed. openZFS is in use, but the problem was reproduced on vanilla kernels. Ciao, Thorsten