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 X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4817AC433B4 for ; Tue, 18 May 2021 10:20:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2FCDF611BF for ; Tue, 18 May 2021 10:20:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348417AbhERKWN (ORCPT ); Tue, 18 May 2021 06:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241390AbhERKWG (ORCPT ); Tue, 18 May 2021 06:22:06 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACF1CC061573 for ; Tue, 18 May 2021 03:20:46 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id a4so9617233wrr.2 for ; Tue, 18 May 2021 03:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=70ytm4W0WP5qG41Y6kcb7UDXaJDfERJqeAyjJPyIpfw=; b=Uv+GAHDgcZbUm2zGwTW9XJE77SnSSgIbjr+0yXlS/BSOwyDCahG2BrBG+B9fx6xgUR 2d251BjxqiRP4QngXmg+RT9+RE4bpEIUWUHajM6o5N++rP60IeKJlN16BAjIbHOKFfqY yYZ29frKkzKR/9/FqWAlqWUrvck9BOXa7/H3Myboh3FX01spR2lEAqXTVTGvZPueICFS 8Y4V6d3EpeYXGaalsYUrZy28VFc3WlTbjvO0BtzGsS52CYmtGulBczIP4qzktdRHssoI JLbGdka9F+jonY6DG3pkKZ/V9CGDrECIYPd0xg06JlH+TpoLBTE2oYkuS5rR02qyztEe ldzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=70ytm4W0WP5qG41Y6kcb7UDXaJDfERJqeAyjJPyIpfw=; b=H6CViPf//tCAtsOVJLQA1eYe6ho0uF6y8/m4u1Y3/2Ix+V6FcZqJo0Gy2bNC8GUz+8 Tsu64Po0iThswQQxYe1IsKZL/7tQfc4lOKyCrdj+6JPyPVQfRTeHKEmRfQGoHNarIRN7 OgsbBvCT1JarHJCN6K6HMahcShWau4qlDuHCnkNcv7nBp2AOog3m4oCbTHeZy1xpcuGc mXcbHW+Br7Ja1+ey8tRpn0PjtDEJWOpDARextoBb6Hw2pFCGNPN1NHMEnAX2weRMSnP6 9qQBv9FHsoIBSdNtgm3XmQ6Q+L39adImBDRGoTKmfvaE9OLRjw/Olav9ePAuSnxtO7uJ pykQ== X-Gm-Message-State: AOAM531nLKtAwrGmaeOKyFrb73z3IvdpBodXVCS55jlrNLv1bX8ohkU4 OZY0i+TXEAtnpNqTNSp6NKZsjJkac8x+PQ== X-Google-Smtp-Source: ABdhPJwGsDXSNDfperQKGi8GavxUP9aJ6KvyV2Q3pXV8ILLSRN0HEh7dHMbiP7y3oBxMbndkBSYZlQ== X-Received: by 2002:a5d:47ae:: with SMTP id 14mr5879747wrb.190.1621333245170; Tue, 18 May 2021 03:20:45 -0700 (PDT) Received: from google.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id o8sm2569124wrx.4.2021.05.18.03.20.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 03:20:44 -0700 (PDT) Date: Tue, 18 May 2021 10:20:38 +0000 From: Quentin Perret To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , kernel-team@android.com Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE Message-ID: References: <20210518094725.7701-1-will@kernel.org> <20210518094725.7701-14-will@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210518094725.7701-14-will@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 18 May 2021 at 10:47:17 (+0100), Will Deacon wrote: > On asymmetric systems where the affinity of a task is restricted to > contain only the CPUs capable of running it, admission to the deadline > scheduler is likely to fail because the span of the sched domain > contains incompatible CPUs. Although this is arguably the right thing to > do, it is inconsistent with the case where the affinity of a task is > restricted after already having been admitted to the deadline scheduler. > > For example, on an arm64 system where not all CPUs support 32-bit > applications, a 64-bit deadline task can exec() a 32-bit image and have > its affinity forcefully restricted. So I guess the alternative would be to fail exec-ing into 32bit from a 64bit DL task, and then drop this patch? The nice thing about your approach is that existing applications won't really notice a difference (execve would still 'work'), but on the cons side it breaks admission control, which is sad. I don't expect this weird execve-to-32bit pattern from DL to be that common in practice (at the very least not in Android), so maybe we could start with the stricter version (fail the execve), and wait to see if folks complain? Making things stricter later will be harder. Thoughts? Thanks, Quentin 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 X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17E97C433B4 for ; Tue, 18 May 2021 10:27:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F3E461002 for ; Tue, 18 May 2021 10:27:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F3E461002 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4uM0FDdwyR0GDvjV1L5w0LXp849uJmn2GDFubHJclZw=; b=PL4qO8v6xhON++Gh/+4agz1t4 HlaofqNvIihHV0kN5PIPDiRVyZByi9cPOLrLmzN27N6Y5JTxv5o22d5DdVftyvoRq8U3QpQXxSMi+ ugqWINkBCU70xdrgUtJmD9eBh+uvYMw2HULuVazc2Gre+gfpdBz3bDZaXPXnkignNno+nr3PUBSkf gfLIs17uvi1ufbT9qUO0+OOMaiqFV3UeeiJuIBs0ihtsh+hwTFqnKWEjW4M4IeOT4Rbdl493hC4Ue nbmLLw+ayM6ExxsrgUrsMn6f0gd0mBNF68lPy7ttX+dqkHcEVTtVgka1BlquWr+EHzmN4W9yuVqVa ZM2n7p7kQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1liwv4-000MuN-Kq; Tue, 18 May 2021 10:25:46 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwqI-000LRG-RD for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 10:20:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=70ytm4W0WP5qG41Y6kcb7UDXaJDfERJqeAyjJPyIpfw=; b=dGPlD0EPoZNIoK+h+abKTow1VK 1jwzGTBXfjiVufR0fhxv1X7mRhw1/F/iFCeDyBwKYPi5adooF0oEc+ZSJi3jRbwVoOFXIfFJp9ah1 7mwWPB4AR5m1g/nPr6ygiICkSFOdEMdIGoisolgTfBkPIaU4FL6SEN0xu0UprHaszlDCUbqHwqS33 zXGEEBdHk1bsR0MYac26NtiAvIyHToNEYC1L5SAoNYPnvj6fKpm/dLUqE+oDbV/BH4C+xGTs9da/i +ge/M8yvnrBH2ulVUelBtxOXDt1k1qvV8nOwXUo5UxtMQcAbaBQrcgzxiPiPFhgd8ifyavtwlDPe4 YGS+gTCQ==; Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1liwqG-00EYeg-37 for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 10:20:49 +0000 Received: by mail-wr1-x42c.google.com with SMTP id z17so9563650wrq.7 for ; Tue, 18 May 2021 03:20:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=70ytm4W0WP5qG41Y6kcb7UDXaJDfERJqeAyjJPyIpfw=; b=Uv+GAHDgcZbUm2zGwTW9XJE77SnSSgIbjr+0yXlS/BSOwyDCahG2BrBG+B9fx6xgUR 2d251BjxqiRP4QngXmg+RT9+RE4bpEIUWUHajM6o5N++rP60IeKJlN16BAjIbHOKFfqY yYZ29frKkzKR/9/FqWAlqWUrvck9BOXa7/H3Myboh3FX01spR2lEAqXTVTGvZPueICFS 8Y4V6d3EpeYXGaalsYUrZy28VFc3WlTbjvO0BtzGsS52CYmtGulBczIP4qzktdRHssoI JLbGdka9F+jonY6DG3pkKZ/V9CGDrECIYPd0xg06JlH+TpoLBTE2oYkuS5rR02qyztEe ldzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=70ytm4W0WP5qG41Y6kcb7UDXaJDfERJqeAyjJPyIpfw=; b=ccS5izKMzlrsKRigWYGPqp6defEnz5KMy04elY1EiGaOrR5sXZ9KNwKLmL0P48Y4V9 B1iy7aZL4GYtmGHThVPAc67ukihWLEYyN3rDhk7ug8LysqXk7GrJGSZkqz7p9oybPW+A udnenNPA1IVNrJINoSLLOqkhtCV4HfC55GpMCq2gK1810k6IpZ1eWnC0BYKha4ztt6m2 OcYvSxpPkPaVTuedWeHJBUrqiLBU78bVmN+PXPOIN/FdZNMdjrlO/IdI40z1V3j4+hHk 7AaCsW/lhoJgapHfjaJqxC3Awk/HhFXtgTXXjqOQKhXqZh68Xu9aG6CFTeJY08smuq3f pfzw== X-Gm-Message-State: AOAM531XMeJFl+ir7qK/8kWhY+CinVT2AGfPw0ZFB/S72peqwIkma7al AaH+xYc2faqIf9luddJZ6ZRbTQ== X-Google-Smtp-Source: ABdhPJwGsDXSNDfperQKGi8GavxUP9aJ6KvyV2Q3pXV8ILLSRN0HEh7dHMbiP7y3oBxMbndkBSYZlQ== X-Received: by 2002:a5d:47ae:: with SMTP id 14mr5879747wrb.190.1621333245170; Tue, 18 May 2021 03:20:45 -0700 (PDT) Received: from google.com (105.168.195.35.bc.googleusercontent.com. [35.195.168.105]) by smtp.gmail.com with ESMTPSA id o8sm2569124wrx.4.2021.05.18.03.20.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 03:20:44 -0700 (PDT) Date: Tue, 18 May 2021 10:20:38 +0000 From: Quentin Perret To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Catalin Marinas , Marc Zyngier , Greg Kroah-Hartman , Peter Zijlstra , Morten Rasmussen , Qais Yousef , Suren Baghdasaryan , Tejun Heo , Li Zefan , Johannes Weiner , Ingo Molnar , Juri Lelli , Vincent Guittot , "Rafael J. Wysocki" , kernel-team@android.com Subject: Re: [PATCH v6 13/21] sched: Admit forcefully-affined tasks into SCHED_DEADLINE Message-ID: References: <20210518094725.7701-1-will@kernel.org> <20210518094725.7701-14-will@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518094725.7701-14-will@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_032048_179697_558AF727 X-CRM114-Status: GOOD ( 15.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tuesday 18 May 2021 at 10:47:17 (+0100), Will Deacon wrote: > On asymmetric systems where the affinity of a task is restricted to > contain only the CPUs capable of running it, admission to the deadline > scheduler is likely to fail because the span of the sched domain > contains incompatible CPUs. Although this is arguably the right thing to > do, it is inconsistent with the case where the affinity of a task is > restricted after already having been admitted to the deadline scheduler. > > For example, on an arm64 system where not all CPUs support 32-bit > applications, a 64-bit deadline task can exec() a 32-bit image and have > its affinity forcefully restricted. So I guess the alternative would be to fail exec-ing into 32bit from a 64bit DL task, and then drop this patch? The nice thing about your approach is that existing applications won't really notice a difference (execve would still 'work'), but on the cons side it breaks admission control, which is sad. I don't expect this weird execve-to-32bit pattern from DL to be that common in practice (at the very least not in Android), so maybe we could start with the stricter version (fail the execve), and wait to see if folks complain? Making things stricter later will be harder. Thoughts? Thanks, Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel