From owner-svn-src-all@freebsd.org Mon Sep 11 08:37:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18046E2325E; Mon, 11 Sep 2017 08:37:53 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C30D77736B; Mon, 11 Sep 2017 08:37:52 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-qt0-x229.google.com with SMTP id i50so17620366qtf.0; Mon, 11 Sep 2017 01:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ijWwq+oT8rK2dxuriAT6ZjoJBnRmihr+1megLS2FULM=; b=qObFnhKVKewBsGCS5/eGAPbavhd3JSMVFlUSpsNSykDTb0SLU5HxZw0Tc45Shrcwvq 80RT/Mr/ENLd1g0lDZa9bIgQbpVC6VWqwEwMiJvPGAShaIrEpVPwPUgxymBim3Bau7NH jHvcoEPgXFxTtKFsKsDU3qA8a+z6HaeXCbmfiBi8pJ2+uYRHo78BXi52cdKVFs6TIkGN EYfRcxV2oYPZ3U0Gt6aFQnvsF+oWWZwRwl3ajY3basuPFdcxpfaLW+6AuGYEmFSMbaVP 5B8gl955IPjjd9JSfJruX3j1wnEVSVuLYnFraardt407xtC1xLj8qdJuv7UH6BE7nwe/ BS7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ijWwq+oT8rK2dxuriAT6ZjoJBnRmihr+1megLS2FULM=; b=dAqS9wmvMnflJQNv8PKYlKnqdrKxBMxTGjvelTW5qwffcz8XmkZo17R8ZKK3MCpILi TrFJCNWanQ8ii/7KAOa78N3VRr7V7AkY6m8Ql2i2PkwLH6v4hlSU6V4TjjAIrtlzjTUM 7PS3kvbbX6yBvSotiobagVpZ5q/xCKLcUO2MbC2KszHi477QS68qUnvQnRDOvnm+oP6T T0TB2YN0CgKlex7Choohvl1JpeTSqOHh2jN+QcrylJmkNiFjjk4u7jRNG03OMlwcureT Ir800W/FFz12/dqGpvwaLkj+xwFJIGdEp4HJTdT0Fj8eWq6wKnhZorHQ9qkfZq0OSsfU 2VyQ== X-Gm-Message-State: AHPjjUgjXPBTfK+nC1raBchFYBiUGSGHbDFWE2feCs9qqeahmdP3QRzT YtxKwH/h55vuL4E1mGBIdwAPkKCoorou X-Google-Smtp-Source: AOwi7QA2TE2W+sEkr265m4hvfVgT8aLrukoYnAJX0wvT1BBnIB6pNlgaCAduhUutOAad8/EqjCjMsQGIP8aS82P4Pzc= X-Received: by 10.200.35.65 with SMTP id b1mr14281106qtb.329.1505119071916; Mon, 11 Sep 2017 01:37:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.43.121 with HTTP; Mon, 11 Sep 2017 01:37:50 -0700 (PDT) In-Reply-To: References: <201709101900.v8AJ0c2N059845@repo.freebsd.org> <20170911111127.B870@besplex.bde.org> From: Mateusz Guzik Date: Mon, 11 Sep 2017 10:37:50 +0200 Message-ID: Subject: Re: svn commit: r323393 - in head/sys: sys vm To: Ryan Libby Cc: Bruce Evans , Mateusz Guzik , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2017 08:37:53 -0000 On Mon, Sep 11, 2017 at 10:24 AM, Ryan Libby wrote: > On Mon, Sep 11, 2017 at 12:30 AM, Mateusz Guzik wrote: > [...] > > That said, looking now at the struct I think its use should be retired > > from the kernel. It can remain in headers for userspace use. > > > > First, there is a bunch of counter(9) fields. I don't know the original > > reasoning. I would expect these counters to be statically defined in a > > per-cpu struct. > > The actual counter(9) counters are per-CPU. These are just offsets into > the PCPU area. See r317061 / D10156 (recent work by glebius). > I mean their ids are allocated on boot, even though these counters are always present and could be resolved at compilation time. So in order to update them you have to fetch the id, as opposed to having the code just do the right thing. I.e. for stuff which is always there we should just have well known offsets into per-cpu tables. But I'm not going to try to flame a patch in (or write one). -- Mateusz Guzik