Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp349290ybz; Tue, 21 Apr 2020 10:10:06 -0700 (PDT) X-Google-Smtp-Source: APiQypJulQj8FXkEuZ40bHCH2KcJda7n4wQJ/qqgO+tyy2a1wF92/wC65XPQl9ns18B/2LLPc9Z5 X-Received: by 2002:a50:aca3:: with SMTP id x32mr20254795edc.368.1587489006449; Tue, 21 Apr 2020 10:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587489006; cv=none; d=google.com; s=arc-20160816; b=It5Rlm6P8d+valZWocbTf6z1k80Z7j5USIoX9YtIRPHC0nxWuUjiw/QpmMoEfgUFG/ mLAbgJ2NT00y52rb/d9JxMZD4vhyKaQqzhisEbL5TNIr0M3cjDld40h+Xl470IKas1Bz g7485Pd61zeyE5OmKcmwCMpx7gwPYaq/cEmSzSmmhA0W9wden1+Ae274hV6CjSYiAlQU 3Qu6Nj5UsmNE93Bg6PH2cfPxp1l0N0lRYDYmk5S+2ISQ9e9o+IlTlqLrMImhIAeutqMD MrI3Xv+H3oHBtbe/uaD7xCdZ8LsNnGhk5wMTVjlIUQn1aYpMrv0t7uJs9PLNpMrKrjI9 tr0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=hRby/GaY4ncpy7xXsgQhDkX3RBVaqXic4ZU9biVTX/M=; b=wm6IYBoA8Jum+24HNCidMcgRylV6nDgz5gyKfbG2XbwWb6G2Ac20eVW/tyLuFz94Pt OM0kqiDlDAEpNAFBS74BOLUiJCZZ5J90Q76oZE52xPHvlSoVM7PETFez3XTCB960bx9o 97J3jYwRydby8LIZKjQevdpZ2kUSD6+Al4l0bY3LFme6dD3mhudPu4iHBX31jFHjhHpP 464TRUYGiVwQ39DKOwMGI5MbL1c5QYKmaK6U9yeZ8bz81FdnpO7/BOucDta6W3OsT3rv 5GRS6+oK+mYSNeTFCvDMuY1s/Jm97ywevuP4rgAjhiqh4VoiqDdhglIenYdtdrHVQNZ/ q5ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RUDNecfn; 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 n24si2030629edt.193.2020.04.21.10.09.43; Tue, 21 Apr 2020 10:10:06 -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=RUDNecfn; 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 S1729083AbgDURGj (ORCPT + 99 others); Tue, 21 Apr 2020 13:06:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725987AbgDURGi (ORCPT ); Tue, 21 Apr 2020 13:06:38 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E93A3C061A41; Tue, 21 Apr 2020 10:06:37 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id f13so17270686wrm.13; Tue, 21 Apr 2020 10:06:37 -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:in-reply-to; bh=hRby/GaY4ncpy7xXsgQhDkX3RBVaqXic4ZU9biVTX/M=; b=RUDNecfnjYrJmr+hFUi5bG1OlRyIRXcFPWEbOz+cNMgTuapSQeOvXp+91Nu5u/h65a kVHiu2E/e2yOM7L5YbjDYeDu2vALohoMTi+cyleLuWgk0YL3N3JO7teWCmh+im6TAh9F bWJXRhZVrfr3+18kXwEM8Ql+I/uP7auoepsXGSemaesvzkCggAlyT7tz8P6HbTEvkqo3 ltxN7P2h5JXTtu92ykaPHPZ5K5PnQMbEodK9Dj7vYWkN2n95+YZl+bfSQaZ86U+C7pKP iHwjtyTczyfZCkikBd3zJwZdWCdyiezhRIIbPWLLz6AKj2vUXbXRZv/jCI2bRklOtZ7R bA2Q== 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:in-reply-to; bh=hRby/GaY4ncpy7xXsgQhDkX3RBVaqXic4ZU9biVTX/M=; b=Ab5tkhKVhdkDaxCABJcuTJ8tWxQ9csQyQKsatpfeDG7kLAtHAsLK7nYyezz0wXRb4F TjnZueI6ScL4wQ/OHEm/tM6A78ezQMlENqTHBaZTdCNs+fepnzFshGLJjvgJcwjVYcTP gwPXMMRerkbtN3ufunrpJtlUYgREwnIrljOIBTrtn2T0Qgs6Pw7eQlaDbHL5jpmEhwxl ML2s7tOUYxN2zGyd5M6RjtbGHASwRGhfZ811eO+OInHKwqT9WUpjSxpg7bB5MyaEU8qE PnIt+79VJIJ0so0GvrSmBGSvgDIg1Shqc6n7XlBbTWo633nnr3h10O0Bc2fvD9hwzCvD y+Fg== X-Gm-Message-State: AGi0PubnvT5N8XdtCg0PBUYtmDhv9YO0/rpMQ8pRsnMWdPMzHKi/QhlC yxhjL6bA2a6wza+eUJZIJg== X-Received: by 2002:adf:8363:: with SMTP id 90mr23739359wrd.233.1587488796755; Tue, 21 Apr 2020 10:06:36 -0700 (PDT) Received: from avx2 ([46.53.252.84]) by smtp.gmail.com with ESMTPSA id l5sm4051806wmi.22.2020.04.21.10.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 10:06:36 -0700 (PDT) Date: Tue, 21 Apr 2020 20:06:34 +0300 From: Alexey Dobriyan To: Matthew Wilcox Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, pmladek@suse.com, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, andriy.shevchenko@linux.intel.com, linux@rasmusvillemoes.dk Subject: Re: [PATCH 01/15] sched: make nr_running() return "unsigned int" Message-ID: <20200421170634.GA31089@avx2> References: <20200420205743.19964-1-adobriyan@gmail.com> <20200420210557.GG5820@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200420210557.GG5820@bombadil.infradead.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 20, 2020 at 02:05:57PM -0700, Matthew Wilcox wrote: > On Mon, Apr 20, 2020 at 11:57:29PM +0300, Alexey Dobriyan wrote: > > I don't anyone have been crazy enough to spawn 2^32 threads. > > It'd require absurd amounts of physical memory, and bump into futex pid > > limit anyway. > > > > Meanwhile save few bits on REX prefixes and some stack space for upcoming > > print_integer() stuff. > > > > And remove "extern" from prototypes while I'm at it. > > It seems like there's a few more places to fix in this regard? > > kernel/sched/fair.c:static u64 __sched_period(unsigned long nr_running) > kernel/sched/sched.h: unsigned long dl_nr_running; > kernel/sched/core.c:unsigned long nr_iowait_cpu(int cpu) > kernel/sched/core.c:unsigned long nr_iowait(void) > kernel/sched/loadavg.c: long nr_active, delta = 0; > kernel/sched/sched.h: unsigned long rt_nr_migratory; > kernel/sched/sched.h: unsigned long rt_nr_total; > kernel/sched/sched.h: unsigned long rt_nr_boosted; > kernel/sched/sched.h: unsigned long dl_nr_running; > kernel/sched/sched.h: unsigned long dl_nr_migratory; > kernel/sched/sched.h: unsigned long nr_uninterruptible; Sure. I changed nr_running() and nr_iowait() because they're in format strings in /proc as %lu.