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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 863E5C54E94 for ; Thu, 26 Jan 2023 12:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233977AbjAZMwS (ORCPT ); Thu, 26 Jan 2023 07:52:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231665AbjAZMwP (ORCPT ); Thu, 26 Jan 2023 07:52:15 -0500 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F3CF40FA for ; Thu, 26 Jan 2023 04:52:14 -0800 (PST) Received: from [2a02:8108:963f:de38:4bc7:2566:28bd:b73c]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1pL1jV-0004bq-M2; Thu, 26 Jan 2023 13:52:01 +0100 Message-ID: Date: Thu, 26 Jan 2023 13:52:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v10 2/5] sched: Use user_cpus_ptr for saving user provided cpumask in sched_setaffinity() Content-Language: en-US, de-DE To: Will Deacon , Waiman Long Cc: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , Tejun Heo , Zefan Li , Johannes Weiner , linux-kernel@vger.kernel.org, Linus Torvalds , Lai Jiangshan , qperret@google.com References: <20220922180041.1768141-1-longman@redhat.com> <20220922180041.1768141-3-longman@redhat.com> <20230117160825.GA17756@willie-the-truck> From: "Linux kernel regression tracking (#adding)" Reply-To: Linux regressions mailing list In-Reply-To: <20230117160825.GA17756@willie-the-truck> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1674737534;5fac7585; X-HE-SMSGID: 1pL1jV-0004bq-M2 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.] On 17.01.23 17:08, Will Deacon wrote: > > On Thu, Sep 22, 2022 at 02:00:38PM -0400, Waiman Long wrote: >> The user_cpus_ptr field is added by commit b90ca8badbd1 ("sched: >> Introduce task_struct::user_cpus_ptr to track requested affinity"). It >> is currently used only by arm64 arch due to possible asymmetric CPU >> setup. This patch extends its usage to save user provided cpumask >> when sched_setaffinity() is called for all arches. With this patch >> applied, user_cpus_ptr, once allocated after a successful call to >> sched_setaffinity(), will only be freed when the task exits. > [...] > We've tracked this down as the cause of an arm64 regression in Android and I've > reproduced the issue with mainline. > > Basically, if an arm64 system is booted with "allow_mismatched_32bit_el0" on > the command-line, then the arch code will (amongst other things) call > force_compatible_cpus_allowed_ptr() and relax_compatible_cpus_allowed_ptr() > when exec()'ing a 32-bit or a 64-bit task respectively. > [...] Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot: #regzbot ^introduced 8f9ea86fdf99 #regzbot title sched: incorrectly set affinity masks and performance regression on arm64 #regzbot monitor: https://lore.kernel.org/all/20230121021749.55313-1-longman@redhat.com/ #regzbot ignore-activity This isn't a regression? This issue or a fix for it are already discussed somewhere else? It was fixed already? You want to clarify when the regression started to happen? Or point out I got the title or something else totally wrong? Then just reply and tell me -- ideally while also telling regzbot about it, as explained by the page listed in the footer of this mail. Developers: When fixing the issue, remember to add 'Link:' tags pointing to the report (the parent of this mail). See page linked in footer for details. 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 That page also explains what to do if mails like this annoy you.