Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2013 21:12:38 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Juli Mallett <juli@clockworksquid.com>
Cc:        Warner Losh <imp@freebsd.org>, "freebsd-mips@freebsd.org" <freebsd-mips@freebsd.org>
Subject:   Re: Can we undo the octeon hack?
Message-ID:  <793CB840-40AF-487E-99A0-2C34FF17FD11@bsdimp.com>
In-Reply-To: <CACVs6=8VT0dQug%2B8od45VvoJQn1f-2j%2Bu%2BidMXC3SFz9iLyd7A@mail.gmail.com>
References:  <CAJ-VmonJg2BhBdckFb1O79ZnWrXKZhT%2Bku9SjuswLui6iZC1Ow@mail.gmail.com> <6401792509903023722@unknownmsgid> <F0B68A50-B5BF-426E-874C-1EFC03CAEAEB@bsdimp.com> <CACVs6=_Ss_C0v_eHFzOsM1QKi43EU4j3SUmOTsC=XmhMFPqeAw@mail.gmail.com> <8C6BE511-2CCD-434F-BE72-43F350E8AA2C@bsdimp.com> <CACVs6=9mjoB7LQ4OkvT7CJ8b0cG_G9o9XJsAauqxUYwo7MFpkQ@mail.gmail.com> <CAJ-VmoniT-2cX9y%2BcfQJQ7OwMnbvjB1gTHym_LT=ngy8AnuN2g@mail.gmail.com> <CACVs6=8VT0dQug%2B8od45VvoJQn1f-2j%2Bu%2BidMXC3SFz9iLyd7A@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jul 21, 2013, at 9:00 PM, Juli Mallett wrote:
> I know I shouldn't say this, but: How hard can it be? :P

How hard do you want it to be?

> In kern.pre.mk:
>=20
> CFLAGS_PARAM_INLINE_UNIT_GROWTH?=3D100
> CFLAGS_PARAM_LARGE_FUNCTION_GROWTH?=3D1000
> CFLAGS_PARAM_MAX_INLINE_INSNS_SINGLE?=3D/* XXX what is default? */
> CFLAGS+=3D --param =
inline-unit-growth=3D${CFLAGS_PARAM_INLINE_UNIT_GROWTH}
> CFLAGS+=3D --param =
large-function-growth=3D${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH}
> CFLAGS+=3D --param =
max-inline-insns-single=3D${CFLAGS_PARAM_MAX_INLINE_INSNS_SINGLE}
>=20
> And then in the Octeon config:
>=20
> makeoptions CFLAGS_PARAM_INLINE_UNIT_GROWTH=3D10000
> makeoptions CFLAGS_PARAM_LARGE_FUNCTION_GROWTH=3D100000
> makeoptions CFLAGS_PARAM_MAX_INLINE_INSNS_SINGLE=3D10000
>=20
> Right?

Other than being completely wrong, this looks good... :)

> Come up with a better name scheme, win 1/20 of 1 US cent.  (Not
> redeemable for cash.)
>=20
> Most users will never see it; only Octeon needs such behaviour because
> of how the Simple Executive is implemented.

Except we'd need it in every octeon config file :(

Warner

> On Sun, Jul 21, 2013 at 7:56 PM, Adrian Chadd <adrian@freebsd.org> =
wrote:
>> .... ok, so, what's the game plan? :)
>>=20
>>=20
>>=20
>> -adrian
>>=20
>> On 21 July 2013 18:47, Juli Mallett <juli@clockworksquid.com> wrote:
>>> Do you think we should gate moving this singular hack to the Octeon
>>> config file on breaking out a bunch of std.foo files now? :)  I was
>>> just saying that if you're advocating doing that work, we should do
>>> some more generalized stuff, too.  Like, std.pcidriversandwhatnot
>>> should be machine-independent and would reduce a lot of maintenance
>>> between architectures, that kind of thing.  I don't think any of it
>>> should gate moving INLINE_CFLAG_SOMETHING_FOO_WHATEVER_BISCUIT_* =
into
>>> the Octeon kernel config and out of sys/conf.
>>>=20
>>> On Sun, Jul 21, 2013 at 6:34 PM, Warner Losh <imp@bsdimp.com> wrote:
>>>> I would too, but let's not gate a solution to this problem on that.
>>>>=20
>>>> Warner
>>>>=20
>>>> On Jul 21, 2013, at 3:29 PM, Juli Mallett wrote:
>>>>=20
>>>>> I would really like a std.pci or something, too, so we don't have =
to
>>>>> enumerate all the PCI devices in every config.
>>>>>=20
>>>>> On Sun, Jul 21, 2013 at 1:51 PM, Warner Losh <imp@bsdimp.com> =
wrote:
>>>>>> These should really be in the std.foo files for each specific =
subport. That way atheros could have one set, and octeon could have =
another.
>>>>>>=20
>>>>>> I do know that we don't do the std.foo thing for the atheros =
config files, but we really should start, and this would be a good place =
to start...
>>>>>>=20
>>>>>> Warner
>>>>>>=20
>>>>>> On Jul 21, 2013, at 12:54 PM, Juli Mallett wrote:
>>>>>>=20
>>>>>>> Making it possible to override each value would be ideal but
>>>>>>> cumbersome.  If you want to do that, by all means do!
>>>>>>>=20
>>>>>>> Thanks,
>>>>>>> Juli.
>>>>>>>=20
>>>>>>> On 2013-07-21, at 11:44, Adrian Chadd <adrian@freebsd.org> =
wrote:
>>>>>>>=20
>>>>>>>> Hi Juli/Warner,
>>>>>>>>=20
>>>>>>>> Is it possible to undo this particular hack, and allow these =
values to
>>>>>>>> be overridden in the kernel config files?
>>>>>>>>=20
>>>>>>>> from kern.pre.mk
>>>>>>>>=20
>>>>>>>> CFLAGS=3D ${COPTFLAGS} ${C_DIALECT} ${DEBUG} ${CWARNFLAGS}
>>>>>>>> CFLAGS+=3D ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS =
-include
>>>>>>>> opt_global.h
>>>>>>>> .if ${COMPILER_TYPE} !=3D "clang"
>>>>>>>> CFLAGS+=3D -fno-common -finline-limit=3D${INLINE_LIMIT}
>>>>>>>> .if ${MACHINE_CPUARCH} !=3D "mips"
>>>>>>>> CFLAGS+=3D --param inline-unit-growth=3D100
>>>>>>>> CFLAGS+=3D --param large-function-growth=3D1000
>>>>>>>> .else
>>>>>>>> # XXX Actually a gross hack just for Octeon because of the =
Simple Executive.
>>>>>>>> CFLAGS+=3D --param inline-unit-growth=3D10000
>>>>>>>> CFLAGS+=3D --param large-function-growth=3D100000
>>>>>>>> CFLAGS+=3D --param max-inline-insns-single=3D10000
>>>>>>>> .endif
>>>>>>>> .endif
>>>>>>>>=20
>>>>>>>> I'd like to be able to experiment with different inline =
settings in
>>>>>>>> order to try and squeeze kernels down to be smaller.
>>>>>>>>=20
>>>>>>>> Thanks!
>>>>>>>>=20
>>>>>>>>=20
>>>>>>>> -adrian
>>>>>>=20
>>>>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?793CB840-40AF-487E-99A0-2C34FF17FD11>