Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp574497pxb; Mon, 16 Aug 2021 12:05:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2H6cAe6Dmni2qwTHiKombbP4uGRN6AeXrUyGxSZoVG+wNEdhpWirBm00YeOesJZd4Qb0K X-Received: by 2002:a17:906:1ec9:: with SMTP id m9mr17874017ejj.115.1629140705937; Mon, 16 Aug 2021 12:05:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629140705; cv=none; d=google.com; s=arc-20160816; b=H18AFI3LZR4q5Awtf5uNM/xGgNCwVVeMbvxJtMi7tRHNKQy4izxu2CISf/evwuIHzt NbHWsipRZK8ypg6HJnvnLgEg1ylZIKahUF10Y8mNF4uPQzzYh6M0wLBHyeYqOG3dnqHl kQlOEa0+gD/ZlsjM/8QbENcwW6wInUv9xT/yMzBFeHzHH3ITw43SZ4/irDtBv0iX8v82 ghDD3+V52GUbPfpnheOfwNEqApbc/OQVvZLKF34bU7EQaWIu1kTdoylpumMbBZxnjjRe lXgi8OMSzKAAlV5Qh2g7aFBllZN3t3fHdWkpXITyeoN/bZY6r+NOmRPUtkTdvpcsjik4 GsVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=G0f9iRcSsCU/k5L+VbuDUsYeEux2WN96aAx3sy3SC9c=; b=McY7hR/ZIMecyVDSiENI+lWBNVWIJ2JEejVxlJNlYLbI+u53yt9w0iwqGS/octX4zr w7q3cWJsEeQG9rVRxRziFNKpPXBc1EMfpml+Y3hCAlIwoKghTe07wAwgmFHAc2deWD9b BtuezuBcG1PDdmvzBzL0djRP9U2AI8WGoWg02gShyk/r89sJ0eGVEGrEqT+V7nT+lHYK akLtKYNHzbLiPd8ahl/2hBqz1rsE9gWvOx9b0z1G1gWeN5QSU/7de84Eg97E0ZKX/vdY VPdb1N6/Wey3lrTMpS660UW2GZCr4lwiPRZrLERBjBNes4xnR6I7Z7eAz1YmcecEGIFH a4vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Dcrdwc1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g4si11311558edy.555.2021.08.16.12.04.42; Mon, 16 Aug 2021 12:05:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Dcrdwc1B; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230026AbhHPTDS (ORCPT + 99 others); Mon, 16 Aug 2021 15:03:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbhHPTDR (ORCPT ); Mon, 16 Aug 2021 15:03:17 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26C5FC061764 for ; Mon, 16 Aug 2021 12:02:46 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id z5so34842109ybj.2 for ; Mon, 16 Aug 2021 12:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G0f9iRcSsCU/k5L+VbuDUsYeEux2WN96aAx3sy3SC9c=; b=Dcrdwc1B6HWhDdaf1O5JH+TqzMxb3cMuOuaU9GtFTUDuGgaV3Ji5vmD2mKc2/Sb5DR erb+34mjxpF4H1aaNZfvCjRTO+/ssiwYJj/Upf5b+HEEA9OThYCftfBhqPUFIdslsAET ZAIdN9AwwTXuyc26EvpFmQCMjwU16Bi+lxpk4MkbsxjwmtXKAcPgi3a4x2aP/IllUr7S rM3YdN9A4PNT2YjzPlF5y6GI7+GnG6F1Bovvc9dWG+wHaK8uKGsTmX0dYRA3dNv++Ut3 dOsUXMkgztU3w2AP0jnGRMswEMJyTmQdekjPlcZIcLTfLpI3+2ELGD9OEXpdO50iux5q UH7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G0f9iRcSsCU/k5L+VbuDUsYeEux2WN96aAx3sy3SC9c=; b=nE3aA9vXmWKNBj+bTNPPOTx3RO2PzI1e2NfKi6MhqDQ6RQv8TWubOZ+l8yAHQSQY/V KX3OhajfTyt1VpJhklcdUjJh+Jmp4mxx/8stIBVdX+JD+4OyfzY9ABCK/tL4ObYEMyQK W1FqwV+Tpm/egd/EPKvoYqcq8n7grKLiBeoBMTZgzRjZKe1FDX3oCELVbAOuC3nw2V3L Nl0qoxOVKzyk3Qo0tEyW5pNtTVIqOcs9nGn1lHeNH93uSM6kfwQaVddrPMawaKP7Myws 8hF+MBRzR4WaSVpEQIdiGwEagegsD5Gj1q/UEqL1r/bVkZxpTmPGDJzWVy7uMZCmULPC 4PDw== X-Gm-Message-State: AOAM5324pHmzM0+fbeYVQ1+4iMwaA3eZ7fyeX33PhsEHt2NBwcaS/7j0 eXqXbApA7mr9D6ytuSscjoHibXSSyYgP2AB4iw9wVQ== X-Received: by 2002:a25:30c:: with SMTP id 12mr23527035ybd.212.1629140565133; Mon, 16 Aug 2021 12:02:45 -0700 (PDT) MIME-Version: 1.0 References: <20210816154401.23919-1-tao.zhou@linux.dev> In-Reply-To: From: Josh Don Date: Mon, 16 Aug 2021 12:02:34 -0700 Message-ID: Subject: Re: [PATCH] sched/core: An optimization of pick_next_task() not sure To: Peter Zijlstra Cc: Tao Zhou , linux-kernel , Thomas Gleixner , Joel Fernandes , "Hyser,Chris" , Ingo Molnar , Vincent Guittot , Valentin Schneider , Mel Gorman Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 16, 2021 at 11:53 AM Peter Zijlstra wrote: > > On Mon, Aug 16, 2021 at 11:44:01PM +0800, Tao Zhou wrote: > > When find a new candidate max, wipe the stale and start over. > > Goto again: and use the new max to loop to pick the the task. > > > > Here first want to get the max of the core and use this new > > max to loop once to pick the task on each thread. > > > > Not sure this is an optimization and just stop here a little > > and move on.. > > > > Did you find this retry was an issue on your workload? Or was this from > reading the source? I would be surprised if this made a noticeable difference on SMT2, but I could certainly see how this would help with larger SMT configurations where we have more opportunities to invalidate the other siblings.