Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 17:52:34 -0700
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org, David Xu <davidxu@freebsd.org>, Kostik Belousov <kostikbel@gmail.com>
Subject:   Re: svn commit: r214409 - head/sys/kern
Message-ID:  <AANLkTikjvMnaLSrc0MWmL5-kMThgBRJ9GDP5ntYUvHsF@mail.gmail.com>
In-Reply-To: <4CC851CC.80509@freebsd.org>
References:  <201010270232.o9R2Wsu3084553@svn.freebsd.org> <AANLkTi=2dTVmB8Goj%2BNXq4F6SmZBNS3bxn8gLjmQ%2BdfV@mail.gmail.com> <4CC803A8.3040602@freebsd.org> <20101027082122.GD1848@garage.freebsd.pl> <4CC85552.2020100@freebsd.org> <20101027133307.GQ2392@deviant.kiev.zoral.com.ua> <AANLkTinzP%2Btj3y%2B-r4-%2BgHgCzg6BJ-ZpWru365zysSEF@mail.gmail.com> <4CC851CC.80509@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--0016364d2cbdec533f0493a2c1cf
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Wed, Oct 27, 2010 at 9:22 AM, Andriy Gapon <avg@freebsd.org> wrote:
>
> [patch attachment was lost]

Ugh... Mailman hates me I guess :(...

> on 27/10/2010 19:07 Garrett Cooper said the following:
>> =A0 =A0 How about this patch? I implemented this as a readonly tunable a=
nd
>
> I don't think that it's correct to call it a tunable or use CTLFLAG_RDTUN=
.
> As I understand it is a read-only sysctl.

Converted to CTLFLAG_RD.

>> sysconf tunable, because (AFAIK) the value that is being tested
>> shouldn't change during runtime after the system has been booted up,
>> and figuring that the value wasn't going to change it was better to
>> lose 4/8 bytes on the kernel stack instead of having to recompute the
>> value every time in a function call, with the associated lost heap /
>> stack memory in the process, as the assumption is that this libcall
>> was going to be called frequently by some programs.

Thanks!
-Garrett

--0016364d2cbdec533f0493a2c1cf
Content-Type: text/x-patch; charset=US-ASCII; 
	name="cpuset_t-size-sysctl-and-sysconf-value.patch"
Content-Disposition: attachment; 
	filename="cpuset_t-size-sysctl-and-sysconf-value.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gfsx6dxs0

SW5kZXg6IGluY2x1ZGUvdW5pc3RkLmgKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gaW5jbHVkZS91bmlzdGQuaAko
cmV2aXNpb24gMjE0NDEzKQorKysgaW5jbHVkZS91bmlzdGQuaAkod29ya2luZyBjb3B5KQpAQCAt
Mjg4LDYgKzI4OCw3IEBACiAjaWYgX19CU0RfVklTSUJMRQogI2RlZmluZQlfU0NfTlBST0NFU1NP
UlNfQ09ORgk1NwogI2RlZmluZQlfU0NfTlBST0NFU1NPUlNfT05MTgk1OAorI2RlZmluZQlfU0Nf
Q1BVU0VUX1NJWkUJCTEyMgogI2VuZGlmCiAKIC8qIEV4dGVuc2lvbnMgZm91bmQgaW4gU29sYXJp
cyBhbmQgTGludXguICovCkluZGV4OiBsaWIvbGliYy9nZW4vc3lzY29uZi5jCj09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K
LS0tIGxpYi9saWJjL2dlbi9zeXNjb25mLmMJKHJldmlzaW9uIDIxNDQxMykKKysrIGxpYi9saWJj
L2dlbi9zeXNjb25mLmMJKHdvcmtpbmcgY29weSkKQEAgLTU5Nyw2ICs1OTcsMTUgQEAKIAkJcmV0
dXJuIChsdmFsdWUpOwogI2VuZGlmCiAKKyNpZmRlZiBfU0NfQ1BVU0VUX1NJWkUKKwljYXNlIF9T
Q19DUFVTRVRfU0laRToKKwkJbGVuID0gc2l6ZW9mKGx2YWx1ZSk7CisJCWlmIChzeXNjdGxieW5h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