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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71EE4C433EF for ; Mon, 27 Jun 2022 22:54:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240557AbiF0WyK (ORCPT ); Mon, 27 Jun 2022 18:54:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236092AbiF0WyI (ORCPT ); Mon, 27 Jun 2022 18:54:08 -0400 Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9660FC7 for ; Mon, 27 Jun 2022 15:54:07 -0700 (PDT) Received: by mail-yb1-xb29.google.com with SMTP id v185so9701296ybe.8 for ; Mon, 27 Jun 2022 15:54:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=J8p2fOgowjsf8oZFxqGZOg/EZjm2/fdInQfV8uj3Tg4=; b=lmyYiyM2j12gO44/NHgBsznv8Acdn7rsGx9LOa1DMDnJsxBloM50R+jyM8b/1ZxvBk kytYIdVlUB7GUDhGXKTKOwKLAP8msdy5HycKv3A/EKbsr9VrkED/V3e2H0VeZ2ijTPXe ArJWK5/1Mg/g5ali4c83gq4U+77uA0AxgOnSIzD9fZTcwBjolJEzwLy1KlwvZO/ZAf0e 1K+s+qpynni/dm0cIaKOOqyxlKefWZZB0/x+dSnqT0EKkVv3F7NP3ToftLzeRymoeHUX evOLbjOieo2GWJsVWTqJPQvzeHFSltOb3FcG4S7SjIhVGMZnPKgXIdUpnTc1jIuHF0jZ 9/lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=J8p2fOgowjsf8oZFxqGZOg/EZjm2/fdInQfV8uj3Tg4=; b=PafNqLiJlHHG+2JJ1/v+68Ymy8qI8zVYyQVLA0zg/sfKb1gALQwKMH2ztKgMkmtja9 dQV3JYa5+q3PHQe5nOow8lL1QAUnh9e9M9RRrn0jw2mkvZtQhCsQh03DRLmIGMnQA+bz w+pwe0rIH+r/RBTt88bK7rK/EHzWKY75MfH6eBSr6WNloDOi3ZcnsKLeY0US9KBqlh8e /6bt4m5qNjT3WwxVysyY1DiXxSxdHuSzSUPoXZJrjRdbBOnZSf7VOUhAWw6kft4LcixT I65TtQN00LgjfsxrcrwwP3AX7X+aIkXw7f0dgewq8HFFw5+Tts7nzibMozuNnZnq3uvh tcGQ== X-Gm-Message-State: AJIora8Ecfu8TC/I4MoFRWPcBQB1gIrxLIN2afZcXIaws8LsawN2cQEl MKWfOdgt5amIec2pM+61Dhpkm5CmmzqZGWxO0RKAag== X-Google-Smtp-Source: AGRyM1s42lhxj12Q3mI+P6ty59Fb5YUktvgmrfrML6+zuATUXyyKPodhemJYMQuODu8sdf7u6NokoMrKcyg1CZqlcx0= X-Received: by 2002:a5b:a04:0:b0:668:dd55:1ca8 with SMTP id k4-20020a5b0a04000000b00668dd551ca8mr16521779ybq.281.1656370446631; Mon, 27 Jun 2022 15:54:06 -0700 (PDT) MIME-Version: 1.0 References: <20220619120451.95251-1-wuyun.abel@bytedance.com> <20220619120451.95251-2-wuyun.abel@bytedance.com> In-Reply-To: <20220619120451.95251-2-wuyun.abel@bytedance.com> From: Josh Don Date: Mon, 27 Jun 2022 15:53:55 -0700 Message-ID: Subject: Re: [PATCH v4 1/7] sched/fair: default to false in test_idle_cores To: Abel Wu Cc: Peter Zijlstra , Mel Gorman , Vincent Guittot , Chen Yu , Tim Chen , K Prateek Nayak , "Gautham R . Shenoy" , linux-kernel Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 19, 2022 at 5:05 AM Abel Wu wrote: > > It's uncertain whether idle cores exist or not if shared sched-domains > are not ready, so returning "no idle cores" usually makes sense. > > While __update_idle_core() is an exception, it checks status of this > core and set to shared sched-domain if necessary. So the whole logic > depends on the existence of shared domain, and can bail out early if > it isn't available. Modern compilers seems capable of handling such > cases, so remove the tricky self-defined default return value. I don't think the compiler will be able to bail out of the smt iteration early, since it'll have to do another rcu dereference for the sd_llc in set(). But I also don't think this case needs optimization, since it should be transient while the domain isn't ready. Reviewed-by: Josh Don