Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1956848ybh; Fri, 24 Jul 2020 00:17:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7oAr5WxjOLa6D1ekRD9u2Ml16XsyAVP6BML1uCe8Q9OvhaJS8KsmGd7d2pg3Cdyk8xvc/ X-Received: by 2002:a50:fc84:: with SMTP id f4mr977926edq.220.1595575069371; Fri, 24 Jul 2020 00:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595575069; cv=none; d=google.com; s=arc-20160816; b=jOIxA0Sso4QCFuFKROjYeJ8QiEwdkCQ26mmnZ6uvLnSPYoVU4wEzKZ4zrcvodU0Goi A0wuIIJoHzOh+T8VQEUYEkTxa8epLxWV1ZQwy38zhBp5ObGBIM4IoceuVAfR3ZhXbFwZ t52hawuMytO+oLTp3jwMlJBOwT/rd2HugQiAN4dBMnLhvU9bF2JQ/LFmZ85A/PYTOto4 1kAJ2lWpld+SmLjzlgMJERQIDS2F6ZLc40gmxjTW2DIbw5iAdv9vK/UotD2QcMeZhYTv WD4IBbKXBgPjb8HE0L6B89fnxjy5fIyG+GD9N6l/2B9GVyF0p8S/4lsdorRXjmS9ai/C p5gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xY8I4pf+pixvGdggE0GUWeMOFhv+/4UQbvE/fhfVRRE=; b=hdqE1M7a1X79MPI2LeDeahGVEbVtTGE1ZNhbWM5sK4IeyiGS1KRVYe1XhH3t1zPvEW WsAsJ7XR1EReTKmLin0Vp7/rTfstxubt3/ZrC7TTwK6WUjDv6XqsdyytxbULycmO+ABO A/xLRSfh6BZbRcgOFNbkhlOlzZXYijsg0n58vyn5BpA2A/64CHxbF+lLL6TEbQ+ip5y8 u2//n5zc3cHDUmgBWSU6ahjlgyMbmpsvXpDxBK/7Q64BNEnewt07UK6ij3NWUo6aU+gN lBm4VbkS/iQiCRfLkpik8WQIz0e3GP22t3z3AKamBs3bqaadHsGKi2ozH2oMjOO4Hcba 1nGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MdVUML15; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si5517edl.585.2020.07.24.00.17.27; Fri, 24 Jul 2020 00:17:49 -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=@gmail.com header.s=20161025 header.b=MdVUML15; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726742AbgGXHPN (ORCPT + 99 others); Fri, 24 Jul 2020 03:15:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726543AbgGXHPM (ORCPT ); Fri, 24 Jul 2020 03:15:12 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B055EC0619D3 for ; Fri, 24 Jul 2020 00:15:12 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id z3so4570931pfn.12 for ; Fri, 24 Jul 2020 00:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=xY8I4pf+pixvGdggE0GUWeMOFhv+/4UQbvE/fhfVRRE=; b=MdVUML15EvCtvB6RqedwgUH8PVDTER0vLv8exMiOSppxNU0hMnzjWPGJ6+yIPinPYZ USMtfYMe1Mg29OSkrh4+ncgGKoqUf84HHFMiEPNMzhqXURCJiPAj5BgUTw3nEcuSF86g 7C6FeFA6lrdsl8WHJFwLbhhyj2tsvkDYn3GVORm2/d2ip4Du5uYld5CXGgab69JjqhrZ muU0epdnTXhd0Dfb5/cLq1onDvFinndst+6Kp+DonqBnXszXDA9pkkm4GADjVAseyO8u sx/YaSYDsGCQhqSTK52A3mUR6kEQmQIvRpMVU3mx5vI3YUZEx2Ac8SKDC+7w0ExpHkND j1cg== 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:content-transfer-encoding :in-reply-to:user-agent; bh=xY8I4pf+pixvGdggE0GUWeMOFhv+/4UQbvE/fhfVRRE=; b=dJp7uxe3GN4u7WHEOynMvL2/lPsGlMKz6pyeIEbzu1RDTW3USB/XCJQZM9DjRa2AkF JU7JH1jSpro9p6fqUyt73/W4EJtlbNbV0Z2Ptyf7Z94E8NomG2IxRNXOUo+fqwPVrZkj a8+wa8B/Taknjwk7rxA/hKJPG75nIdlwszNu8UHsLhZlw9rglaauljbNRA88nh/hc9Sr BQ5yfKtLxpOadpKsXv5mHl5DLKEcXpi3GYBGw3PgE+hbYSL0hRSdAv4BI0tzy51uTPUf ejtTox1YK9MqM4OFuT8K57yWqstUGl0OmV2qxWQiL3/pxOKVDJuVb3nE15gL/c0Es2nJ QyVw== X-Gm-Message-State: AOAM530ntLWVf4am4Dz7Tqpad/teN41ze3nY8LcsqnpnDJrv7P2TEkxS awM/fXy4juinYDf/5AkluIY= X-Received: by 2002:a62:a20d:: with SMTP id m13mr7914886pff.201.1595574912239; Fri, 24 Jul 2020 00:15:12 -0700 (PDT) Received: from aaronlu-desktop ([47.89.83.67]) by smtp.gmail.com with ESMTPSA id x3sm5100680pfn.154.2020.07.24.00.15.06 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Jul 2020 00:15:11 -0700 (PDT) Date: Fri, 24 Jul 2020 15:14:58 +0800 From: Aaron Lu To: =?utf-8?B?YmVuYmppYW5nKOiSi+W9qik=?= Cc: Vineeth Remanan Pillai , Nishanth Aravamudan , Julien Desfossez , Peter Zijlstra , Tim Chen , "mingo@kernel.org" , "tglx@linutronix.de" , "pjt@google.com" , "torvalds@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "subhra.mazumdar@oracle.com" , "fweisbec@gmail.com" , "keescook@chromium.org" , "kerrnel@google.com" , Phil Auld , Aubrey Li , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , Joel Fernandes , "Joel Fernandes (Google)" , "vineethrp@gmail.com" , Chen Yu , Christian Brauner , Aaron Lu Subject: Re: [RFC PATCH 09/16] sched/fair: core wide cfs task priority comparison(Internet mail) Message-ID: <20200724071458.lah33iacywx35hdi@aaronlu-desktop> References: <2d0e3da8c80c314048d598fb03ae3fe52d9619f3.1593530334.git.vpillai@digitalocean.com> <4229D3E1-8792-4B43-9AC4-F648D49CCC99@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4229D3E1-8792-4B43-9AC4-F648D49CCC99@tencent.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 22, 2020 at 12:23:44AM +0000, benbjiang(蒋彪) wrote: > > > > +/* > > + * This function takes care of adjusting the min_vruntime of siblings of > > + * a core during coresched enable/disable. > > + * This is called in stop machine context so no need to take the rq lock. > Hi, > > IMHO, it seems that stop machine context cannot guarantee race free. The param *cpu* maybe not *this_cpu*, rq lock should be taken even in stop machine context, and irq should be disabled too, to avoid potential races with other contexts. > In stop machine context, all CPUs except the active ones are spinning with irq disabled and in this invocation of stop_machine(), only one CPU is active so I don't think race is possible.