From owner-freebsd-arch@freebsd.org Mon Nov 28 08:31:19 2016 Return-Path: Delivered-To: freebsd-arch@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 B26F8C57ABA for ; Mon, 28 Nov 2016 08:31:19 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (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 79A76139F for ; Mon, 28 Nov 2016 08:31:19 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x231.google.com with SMTP id a10so109248064ywa.3 for ; Mon, 28 Nov 2016 00:31:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dsrpvqfqzKWt8T4hoD/1ilRInCnhE9TonEdOHFtlIUk=; b=Wqvess5TTorwG+EIHrRTc6HdrvARuneZ7J4ZSShtH8hBCaAFISjZN0q8ClO8TOTrH3 xCeL0rxISGxAM+HIaTm1g7/Eb6k1A3rSdQa++8xSfqQcOuvbMGucIklyiHg2p+sVoWDa l/izT1M4koqLJmWrvjuHPvtcRocKBxxd6whqxdi+/N6VCxe8n+8LtpP6n0jRFmbV1FtW 5mpgJZFFnKkRVa/TJ5DVjBBWpH8fbkH8waZljIBjmUx3yyFYV+QuguwLrblZNrQ3phxj quLpuRLzossB7gwnKPZ5RfrmR2kysH+dopEyhjUzymSb28ClsqqJpcJNzEOtZFDyiC4K X1pQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dsrpvqfqzKWt8T4hoD/1ilRInCnhE9TonEdOHFtlIUk=; b=WyqpINdLSvhj60P/5LSuJMtEYT/EhlLpEnmGdiyefCaTUxRTckrOPBYVrPOabKflLR ktEjGhWEoa8IFOVGLuU1OgkQQ7TVVXRMOxKYc3KykEHsBgSOTIiHNeMS/NyWYxzr9dzM T31Ev5sTpKn2r50XtV6IrIJl0Bj+vNyRQMDybkB3EHxQoM+kYa318ySGi1rFU6L8aizn DLE0WdIvfcGu2OChm0eP4GhtFttAttJOSz51NGH1nXv3kCDs1DTvSVMdg6QP7PS38Xbu 5/s9WX2mSNNHbHqiGRgowRAtjPauZWgiALvpG3z6xglxAey9I24Z7D2RK2uXPpudL78H KmQg== X-Gm-Message-State: AKaTC02Wwcxfj1R5vDOp9BIz2idR3sgcc9VPfNwNqK5aQz3IvP2rv2rhzlWaGs1NEhNMzu0eRZE6yArdT1aqnw== X-Received: by 10.129.88.213 with SMTP id m204mr23378204ywb.130.1480321878379; Mon, 28 Nov 2016 00:31:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.31.213 with HTTP; Mon, 28 Nov 2016 00:30:47 -0800 (PST) In-Reply-To: <20161127212503.GA23218@dft-labs.eu> References: <20161127212503.GA23218@dft-labs.eu> From: Ed Schouten Date: Mon, 28 Nov 2016 09:30:47 +0100 Message-ID: Subject: Re: __read_only in the kernel To: Mateusz Guzik Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2016 08:31:19 -0000 Hi Mateusz, 2016-11-27 22:25 GMT+01:00 Mateusz Guzik : > The somewhat standard way of combating parts of it for frequently read > and rarely (if ever) modified variables is an annotation which puts > them in a dedicated part of the binary and the somewhat standard name > for a macro doing the work is __read_mostly. Out of curiosity, what is the advantage of doing this? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717