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 5CAE4C61DA3 for ; Fri, 24 Feb 2023 10:47:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9218B6B00A5; Fri, 24 Feb 2023 05:47:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8D1F66B00A7; Fri, 24 Feb 2023 05:47:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7E8B66B00A8; Fri, 24 Feb 2023 05:47:20 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 705D36B00A5 for ; Fri, 24 Feb 2023 05:47:20 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4717D1618C5 for ; Fri, 24 Feb 2023 10:47:20 +0000 (UTC) X-FDA: 80501858640.26.3BC243C Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by imf26.hostedemail.com (Postfix) with ESMTP id 28E7D140008 for ; Fri, 24 Feb 2023 10:47:17 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf26.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677235638; h=from:from:sender:reply-to: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:in-reply-to:references:references; bh=WRc7tpUjx1YUgdXkIHDYuxQlrTAqAwmHxfOOWCcHPHA=; b=Q9JI5fMS1rB9bq2WakumsQ+dvUpZi1es/3Rpe3Su2/ZedKibC9nqSkag3+1eDPiqjyLE/8 D0k91mPks+uIN8AVFWeXNukURMu1tgJc39zdu6GLYqbINkH26Zy+6p7prRMuxOkoUGNK53 5Vwn1fUHVqR7fxzzBeZdFG7LGgW/STc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf26.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677235638; a=rsa-sha256; cv=none; b=3AP3ZBxC6UlS/Uo74DKnJE/wX2STWKOqK2J9zUOFvOz8Rg0nrUlWLMSigdAbdR/xYMiwpN 9AEnTf2EN1+V2DcHbBy4hfRWktY5nbvx/sk3spCf3oC1XSjGtR1GVI9SN71bPssw1KNQeo ombzCfZqDKT3XMu6NjSDTEGuyd5ifyo= 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 1pVVbf-0001Ao-FL; Fri, 24 Feb 2023 11:47:15 +0100 Message-ID: <07e61f29-5a0e-be38-ad24-01aefdf970bd@leemhuis.info> Date: Fri, 24 Feb 2023 11:47:14 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH RFC] ipc/mqueue: introduce msg cache Content-Language: en-US, de-DE To: Roman Gushchin , Linux regressions mailing list Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Shakeel Butt , Johannes Weiner , Michal Hocko , Muchun Song , Andrew Morton , Waiman Long , Sven Luther References: <20221220184813.1908318-1-roman.gushchin@linux.dev> <7a3e0cb1-54f0-73b2-d9e5-db4d28836bfc@leemhuis.info> From: "Linux regression tracking (Thorsten Leemhuis)" Reply-To: Linux regressions mailing list In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1677235638;7323fbfc; X-HE-SMSGID: 1pVVbf-0001Ao-FL X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 28E7D140008 X-Rspam-User: X-Stat-Signature: rjx74sn6ahy5s8gknuontpdmxya3tkaw X-HE-Tag: 1677235637-808568 X-HE-Meta: U2FsdGVkX18fMG4MBdaRehLgV5oJG4RgdiFLN5Q/mmnM/ko7eT/2hhDrke/ywNSU7/uDq3PeL0vhRgeBDYzbrDij0iaaBwTaiiZMtCuCFS2NvBKnZG+9bIdf2b4yDgEpj3J+FFm9+L7HtNRzRp03shZOO+j3SksMeLQjrDYKn12jzGDCjdj5p+IdrBTRTPUNbkL9wm4plvS3IWIMdUGnoXcVfLypNbQnu112zj/ZkNeA/dtJh05croap4Mtr71Z7eyEokXX1s15pXau5fRJkJ9H9Jg78jgNMYymE4grz73xynKtknYuxCgsKrB77mnqP+vwsC7fjzFNCz8cw+X2xAnH3IBADEUVmR1DUaTP7O8Nm8qRGtSKYrFHc1XESHZfWjbGlBX2Ai1zgfEAJBDP7F2zS7Ch1A2M6PhSTEvTCbWe9x5oOL2xGDzRfXSoH2e8fH62K1ZeP5G1AGVNraA3tUv+Ht1AuD0pEQEMt/Nzh13OKGNL1fFGncSocBtUMvuMUawa6cQrpHfn3YDkTu9KNZSX8PeBjOMQ2PHHLzv23HSTXjIR8i/dEqfGlJr0RHbSm7Esj2B16GdyX3hXK5qVFMJWfSNhyEnrwyHsvrYI+9MecTZj1hIe/FKyqe8n4eLlPClO89x8cbBY2NWDgWM1BwrY9t4PWRsSE8bPcV8vPex/L2VGRIx5OGJCJgvIHt7WYbYtMt5Y0tz61kf767yWTYzWS88Ur1ZZPf2q4+ozoPjg3NrV38TMQIZQFS8G3HvriMpV5cO+49zs9CmNg+fWTx78L+jj1uTLo1LYSPzvAZxPOCWVBV3AB7UItRJCOoVtkqoOiQVzO4HOBlnRZYw5txuzOXlBmR1zXHX5IgK4fDuyN0UIbZSPwJLLQQiodg5e9pi62r/I9DaiSaDV+2sNy9UF2VCnBc76sJjc1CxgAmN/AzcaGEdYbDWXn9U/VvAxOASBgEO3+c/Xs7qxQInl 3JtYoQV0 r3wnAKn+8qOkG/mwP0zSjUQj9YmRJjmM5ets12ad1wdyciuZv5jSaZYgSXk+JtZornnNyz5m6saOM3xfKaCL/+AhQipLBAD4XfKdRNkZUbcHY9SIEq+xm8fPvF1s0AjjRZFBXntGX2cj8af8G8qqsr+WgQd8sfK/Hh/2OLv19ZiZmU0qrgl06voWQlRnUDZcW8zmoCsaNBsl7xSplwEudnpsOGuM7MJdORdJaGK65Vxlgnnung5C8vgRf1Xw6J01IKR4EJt44VvLAmSEEk/BVUZ+PsBhaxehg3Gx4XTOnNdT9hSnjwT5YzaW4rU/yb67UEQ7OZxCt1f5qDj4qqjx2njBPc3MhGwOVwuJ0Ve/3M54uLwpsfcEWNR0K2A== 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: [TLDR: This mail in primarily relevant for Linux kernel regression tracking. See link in footer if these mails annoy you.] On 17.02.23 19:26, Roman Gushchin wrote: > On Thu, Feb 16, 2023 at 01:29:59PM +0100, Linux regression tracking (Thorsten Leemhuis) wrote: >> >> On 20.12.22 19:48, Roman Gushchin wrote: >>> Sven Luther reported a regression in the posix message queues >>> performance caused by switching to the per-object tracking of >>> slab objects introduced by patch series ending with the >>> commit 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all >>> allocations"). >> >> Quick inquiry: what happened to below patch? It was supposed to fix a >> performance regression reported here: > > I wouldn't call it simple a regression, Well, performance regressions are regressions, too. That being said: > things a bit more complicated: > it was a switch to a different approach with different trade-offs, > which IMO make more sense for the majority of real-world workloads. > In two words: individual kernel memory allocations became somewhat slower > (but still fast), but we've saved 40%+ of slab memory on typical systems > and reduced the memory fragmentation. > > The regression reported by Sven and my "fix" are related to one very specific > case: posix message queues. To my knowledge they are not widely used for > anything that performance-sensitive, so it's quite a niche use case. > My "fix" was also hand-crafted for the benchmark provided by Sven, so it might > not work for a more generic case. And I don't think it can be easily generalized > without adding cpu or memory overhead. > > On the other hand I'm working on improving the speed of kernel memory allocations > in general (I posted early versions some weeks ago). Hopefully it will mitigate > the problem for Sven as well, so we won't need these message queue-specific > hacks. Thx for the explanation. Sven didn't complain and it seems no one else run into this, so I think we can live with that state of affairs. #regzbot inconclusive: not fixed, but cause by a trade-off and a likely corner-case anyway; more optimizations planned to improve things #regzbot ignore-activity Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) -- Everything you wanna know about Linux kernel regression tracking: https://linux-regtracking.leemhuis.info/about/#tldr If I did something stupid, please tell me, as explained on that page.