Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp957466imm; Fri, 3 Aug 2018 14:56:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc/F+r7rAAdurLSwye5AMOzLNiMe1X7hKxS3lth27ZcEVsKho0JHl7lYhBGxsE5QIiuilgg X-Received: by 2002:a17:902:780d:: with SMTP id p13-v6mr5023232pll.119.1533333394277; Fri, 03 Aug 2018 14:56:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533333394; cv=none; d=google.com; s=arc-20160816; b=P+7RZPg50mOyEoT9rVxa0VkhIRiunVUg7H5y9HMgGnV2/62T1Ot9MRX306stm7FZbX UFh1i8uwwKP+hH2nm/fHs1IV5NoycdmwBMwLnYvTwMkmM7iDWB5K/dGzexHc4e2K7t+U yAooicQeUe06W+/8xNB1vLu+jg6Eicwz6BAKcjB3vaq/ay8rLpOeiZvurc4VSXZjnGYq 9Qyz+QMOcnyBhOvtc5qhMr8MIcUvb/fSX6UK/YfbG+9yMHmZW5jDZ+ZzrQQY1tL4i+cB BA0shWKD5miwycZLltKEBQ2bMeiMp1uibi2dAdcIVxMLm40kLIBAqNMfLCjplU+ecTvQ x4Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=S94Ur3yHnogMUMEauakXvWjD9Q/olz8XW8y6nwg3/8Y=; b=CX6q0OZ7jLA30GOkIbWOKxH7N3iMi9oKkksT6iyHpQqLFvYX5GMu06UP1QS+HZo43L W3oXc5EHoOojLxNTWYi9coBSVf5eX2FV2bOrFAL3VDS9uP7Z9OrMZaBFD43lkzalWqEb s4v36v1PrSCLfgxy+KQ48wrQcslEVwmn8CjIbQ46ss8nf8k2d6f3tGR0A2pYnFfiYy8Y 0136bfWN/nSOc/Vc8an68oAwwdKYTQdYeD6R/OcBj9jVtofgauCxhy0r8ZFKGHsjP5iY JpvJD3NzOE0eEs/1nout0fg23p/Uj4D2uRU144FGVsGxKWbOT9tdSIs/RSR6SAA00WRq Evvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FOr5oVu1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x22-v6si5686600pfh.84.2018.08.03.14.56.19; Fri, 03 Aug 2018 14:56:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FOr5oVu1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1731994AbeHCXxa (ORCPT + 99 others); Fri, 3 Aug 2018 19:53:30 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:43157 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729876AbeHCXxa (ORCPT ); Fri, 3 Aug 2018 19:53:30 -0400 Received: by mail-pg1-f195.google.com with SMTP id d17-v6so3415541pgv.10 for ; Fri, 03 Aug 2018 14:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=S94Ur3yHnogMUMEauakXvWjD9Q/olz8XW8y6nwg3/8Y=; b=FOr5oVu1m0AeBEpxDhT6rUPmgnCkEEQHicJIr+l3HhevomZrzkVDb2sQaMPFjhGtFX GI/2UR90JOorJca+j83nzX7+xYENs7bwLJQ3LloW0VDJPM83D4bw1xZCNzJ5Inxc9X6f NnqjONqWcGpXYX/aCs/whC51JayteFQ+xSRlkU73MxCQh+F4gDtA+oNY0TzwsL3qsD1p mpn8mIOIwUnwqtYhsKDjHEPq6/6jg/Rnb5eASYpwRrSA00nutKEe3WvL10C4kZMFzOhs /CorpugNdBNOTz6RrXQP3wtxk9dHr3GKmWJ0DWFt5na9rQkjaOvlWQA2FUrBrUOlEOZq FGtw== 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=S94Ur3yHnogMUMEauakXvWjD9Q/olz8XW8y6nwg3/8Y=; b=YcA+mK1ZGzQfv39a9FENC8Ge+07PZpXgLqpmbxloI/LnjSzFlro/SzK/vLdL8gf0gX W/xag74Vdh8IYWw8A0JhvyE5QV968iTv5IVxRzC8GHE6ensR41lMqJ7nrkLtZYNccSPd DhtcBvLnxbJRgDfVkE6HlRnAsynNgI/C0EVNhBjFo1vABPyLboBm7loYR7BWJn/UghEf GwRa7U5h4KVuZK9Iz2RPM3lrGFKnO+FUvkvtO8U0j8ykfFRkYaDxQP8VIRtskUJKIUS1 4+PGNAlt7novsGIOqhmJ3DKMZT9MmhDB9aR4F1AIU6H4kyqIzEOBV3bVro/vST6hGnr0 iHZA== X-Gm-Message-State: AOUpUlHqdWF36x3H5lhFGAyRCruuX1elZ3WlzQbvUop6ozXZq7SIItmX Hk2mpL79b4x+5obQARWQ0biz7wUxL8sm/4iTge4= X-Received: by 2002:a62:9683:: with SMTP id s3-v6mr6379555pfk.191.1533333322706; Fri, 03 Aug 2018 14:55:22 -0700 (PDT) MIME-Version: 1.0 References: <20180728002409.5781-1-xiyou.wangcong@gmail.com> In-Reply-To: From: Cong Wang Date: Fri, 3 Aug 2018 14:56:03 -0700 Message-ID: Subject: Re: [PATCH] sched/fair: sync expires_seq in distribute_cfs_runtime() To: Ben Segall Cc: Xunlei Pang , LKML , Linus Torvalds , Peter Zijlstra , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 1, 2018 at 10:17 AM wrote: > Yes, in practice what's actually going to happen is that the > runtime_remaining will be put to 1 by distribute, the cfs_rq will be > unthrottled, and then when it runs it will go negative immediately and > hit the negative check in expires, so expires_seq being wrong will not > actually matter. In addition, the worst thing that will happen if one of > the account_cfs_rq_runtime(cfs_rq, 0) paths is hit first is that it will > lose 1ns of quota, which also doesn't really matter. Ah, I see. Thanks!