Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp322825rwe; Wed, 31 Aug 2022 03:33:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ut75b+A8zCHs/XlKwFZ29k9wHwdxNI8/99HpDEh1Lm4O/4yKlBKVDqzphC0/PYH/zL36H X-Received: by 2002:a17:90b:3b4f:b0:1fe:2137:3101 with SMTP id ot15-20020a17090b3b4f00b001fe21373101mr2566254pjb.136.1661942007152; Wed, 31 Aug 2022 03:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661942007; cv=none; d=google.com; s=arc-20160816; b=oo7HHY4vR6SXMPO9YdG/YPXefrUV5gDQyz7U0+ilmREzotUbyTzr9G334ayCDdpGHU 8c9MIP4Y/Ou1HN0a2jy+LdyAPNQPllkX5vweHYpTW3CvvFg6980/vyWgCzxGWToNcdDa B6z/CfXhR/OmXtt1+T3R1M3eHvsUNMXKZFnCgGDWgApWJN/V7DwRMZXVp9+GQZRGk3sd CDJmH9eDoyAR8KQI6k6MPEarL/xxc/OvZKqunoDTsuuVmNHq2/+pEQhPG19A6NQMaEJW a9Y68G02ZSEmjuN0LRI/pC/7lSfXobqZjnV3xu1Wwj0YV8874wob37POsZ7AY2zxyqnL ShEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:subject:user-agent:mime-version:date:message-id; bh=3IWUB7eLiqDF6RZL08+apiNlnxQKNyKiAJnSICimnHE=; b=jf5JS7+9CCakFFRp5aQ3BijjCvMcdPjv48XPhOYQybA6bfjotLPSsiOgTs43tVBp77 oBzBkfotrqUdRCiROelbwVCZnYA6AqRXVBRPf9Uqd6fnRow8+MxgGGyUjbtc6q9lazXD zG8kPiUWkN+6edBJZr0/Ja1R9Gi8x9wowcLcEwg92+qrvGLucn5uiDKNSIIQeFymJDhT IZefA0AjcDzNSrz+sn4D44TB2Oyf3SCump2bt/UK/OzH9+/OZ8WUqqtBHaQBk34oXvVK Vq830SeRAvXy0KoGcmHD+0Re6HywM4j8LtOfGXTMNvI5hSe0+4UMQAr50cWR6agXU93v 0dog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a638843000000b0042bbc9f4459si4378021pgd.471.2022.08.31.03.33.15; Wed, 31 Aug 2022 03:33:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231836AbiHaJaX (ORCPT + 99 others); Wed, 31 Aug 2022 05:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbiHaJaT (ORCPT ); Wed, 31 Aug 2022 05:30:19 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86D443F1C7 for ; Wed, 31 Aug 2022 02:30:18 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MHf2M61TQzlWd5; Wed, 31 Aug 2022 17:26:51 +0800 (CST) Received: from kwepemm600008.china.huawei.com (7.193.23.88) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 31 Aug 2022 17:30:16 +0800 Received: from [10.174.176.230] (10.174.176.230) by kwepemm600008.china.huawei.com (7.193.23.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 31 Aug 2022 17:30:15 +0800 Message-ID: Date: Wed, 31 Aug 2022 17:30:13 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0 Subject: Re: [PATCH] sched/deadline: Add should_push_task_away helper To: Daniel Bristot de Oliveira , , , , , , , , , , References: <20220829100533.19153-1-shangxiaojing@huawei.com> <95f8c01c-12b2-5f2e-bc8f-288f16bfa5d3@redhat.com> From: shangxiaojing In-Reply-To: <95f8c01c-12b2-5f2e-bc8f-288f16bfa5d3@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.230] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm600008.china.huawei.com (7.193.23.88) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/8/31 17:23, Daniel Bristot de Oliveira wrote: > On 8/29/22 12:05, Shang XiaoJing wrote: >> +static inline bool should_push_task_away(struct task_struct *a, >> + struct task_struct *b) > static inline bool should_push_task_dl(struct task_struct *curr, struct task_struct *p) > > a and b are not good variable names, and add the _dl suffix (instead of away). ok, i like that :-). This will be done in patch v2. >> +{ >> + return unlikely(dl_task(a)) && >> + (a->nr_cpus_allowed < 2 || >> + !dl_entity_preempt(&b->dl, &a->dl)) && >> + b->nr_cpus_allowed > 1; >> +} >> + > -- Daniel Thanks, Shang XiaoJing