Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp143520rwe; Fri, 26 Aug 2022 02:19:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7r9NUDWsYbYRPUw/coJWrxW4FryrKxSxeLfTj37m2shueLBc/8477bqgzIn0KnfXEYemfc X-Received: by 2002:a17:903:1246:b0:171:5033:85c with SMTP id u6-20020a170903124600b001715033085cmr2955488plh.146.1661505541662; Fri, 26 Aug 2022 02:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661505541; cv=none; d=google.com; s=arc-20160816; b=SgU0bq+AXlFwgdT20p4qzb810NyYDBtHqrlbZoQSMZnkZ5+0FdnnSVUQW4wI0Qn5Er uqQW1ZvkjCEuNrbSILqfLSu4MlXvUy8xjygw8UrymT5HR6MUxsWvF9r14x8axUdUsXIO sbLBAPMLVok9AhQ3ljKjKKiL66JoQINoocdpH4ghBOBIPGDflDfQ8+iQTnwcPWAayNWg fhfKE0ElDjbahSDSHrSuXajuhw0R203/0UNHicYe/vhAxxcr6LHoknnCBsuZ/LwuEgsc ULxBfMcgK4C4nLtWs0cvqSmPtRjqkhEKAGawITPg/m3Kv5pnU1JA2gYJBhGZMQFRZHLU bfTQ== 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:cc:to:subject:user-agent:mime-version:date:message-id; bh=6SHvqTqan3q18AjbCy311eWfYl+7w5N8oAgyj+yQQH0=; b=UrucEs2oUy8TWhR/4fQX0rlwz50ktsulXVAynRsOhf99MeAzrWn7006WzHpwXi8al1 YzuWPfCzkJ5+xaxbpAD35upNTeHCmZiMRSpDn/NRgK90xiQAxwRdpMLHCKMkcSig1gjx 6yZHcGXwx/C8Zn+IndxKXHpyek3kB220tMvWt+2aEgrEorMSy/a2bu1d41qIQTt92I0p wY0R95bWtmKKoXvPbFIiKORKsnoOKEsUiX224vS4OtFDEadibRKDZtD3JhvwgbrlsX7C KkjDnHEHy7CiCohdYS0QV6jsI3QQKox1edmrg1IXINlh8zcIx5Bf6THMdvt78Onz/hcT UeIw== 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 w4-20020a654104000000b0042b59c58ab1si1246314pgp.498.2022.08.26.02.18.49; Fri, 26 Aug 2022 02:19:01 -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 S245050AbiHZJKH (ORCPT + 99 others); Fri, 26 Aug 2022 05:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbiHZJKE (ORCPT ); Fri, 26 Aug 2022 05:10:04 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 907D42D1FF for ; Fri, 26 Aug 2022 02:10:01 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MDYrV4hWYzmVdX; Fri, 26 Aug 2022 17:07:38 +0800 (CST) Received: from kwepemm600008.china.huawei.com (7.193.23.88) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 26 Aug 2022 17:09:59 +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; Fri, 26 Aug 2022 17:09:58 +0800 Message-ID: Date: Fri, 26 Aug 2022 17:09:57 +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 -next] sched/deadline: Add start_new_instance helper To: Daniel Bristot de Oliveira CC: , , , , , , , , , References: <20220826031521.13391-1-shangxiaojing@huawei.com> <651dbb96-8d6e-53e9-a99f-0bb12f5b2723@redhat.com> <893836a5-0aaa-e5e6-81ba-cc9570b9a026@huawei.com> <7927ac6e-7738-822a-59ce-09992947f3b4@redhat.com> From: shangxiaojing In-Reply-To: <7927ac6e-7738-822a-59ce-09992947f3b4@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.176.230] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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/26 16:57, Daniel Bristot de Oliveira wrote: > On 8/26/22 09:40, shangxiaojing wrote: >>> again, this is not a good function name. Maybe, dl_replenish_new_period() ? >> right, i have thought like replenish_new_instance, but when i'm making >> patch,  i was worried that "replenish" is only for ENQUEUE_REPLENISH. > I see, but that is a flag, not the action. > >> what about dl_start_new_period? which means a new deadline will be set, rather than > The thing it is doing is replenishing... > >>     dl_se->deadline += pi_of(dl_se)->dl_period; >> >> in replenish_dl_entity. > that is why I added "new_period".... so replenish_dl_new_period() to keep the consistency. ok, i'll use replenish_dl_new_period in v2. >>>> +static inline void start_new_instance(struct sched_dl_entity *dl_se, struct rq *rq) >>>> >>>> +{ >>>> +    /* for non-boosted task, pi_of(dl_se) == dl_se */ >>>> +    dl_se->deadline = rq_clock(rq) + pi_of(dl_se)->dl_deadline; >>>> +    dl_se->runtime = pi_of(dl_se)->dl_runtime; >>>> +} >>>> + >>> -- Daniel > -- Daniel Thanks, Shang XiaoJing