Re: [TESTING]: boot2 changes
On Wed, Mar 02, 2011 at 02:28:54AM +, Alexander Best wrote: > On Mon Feb 28 11, Roman Divacky wrote: > > hi there, > > > > I have a patch that shrinks boot2 some: > > > > 1) it switches kname to be just a pointer instead of an array > >thus avoiding a couple of memcpy()s > > > > 2) it changes ioctl to unsigned from uint8_t > > > > 3) it changes the first keyhit limit to 5 seconds from 3 > >so that constant propagation can take place > > > > 4) it changes the ticks overflow computation as suggested by bde@ > > > > 5) it removes bi_basemem/bi_extmem/bi_memsizes_valid setting from > >bootinfo as it is unused > > > > > > the patch: > > > > http://lev.vlakno.cz/~rdivacky/boot2-almost-there-diet.patch > > > > It works for me and I'd like you to review/test this patch > > did you also take a look at the code in sys/boot/i386/common? many functions > in > sys/boot/i386/boot2/boot2.c are also defined there and some seem to contain > improved code. > > e.g. was the return type of xputc() changed from int to void, i think that's > quite a resonable change and might reduce the boot2 binary size further. I have some more experimental changes locally, and I am working on that, dont worry :) roman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [TESTING]: boot2 changes
On Mon Feb 28 11, Roman Divacky wrote: > hi there, > > I have a patch that shrinks boot2 some: > > 1) it switches kname to be just a pointer instead of an array >thus avoiding a couple of memcpy()s > > 2) it changes ioctl to unsigned from uint8_t > > 3) it changes the first keyhit limit to 5 seconds from 3 >so that constant propagation can take place > > 4) it changes the ticks overflow computation as suggested by bde@ > > 5) it removes bi_basemem/bi_extmem/bi_memsizes_valid setting from >bootinfo as it is unused > > > the patch: > > http://lev.vlakno.cz/~rdivacky/boot2-almost-there-diet.patch > > It works for me and I'd like you to review/test this patch did you also take a look at the code in sys/boot/i386/common? many functions in sys/boot/i386/boot2/boot2.c are also defined there and some seem to contain improved code. e.g. was the return type of xputc() changed from int to void, i think that's quite a resonable change and might reduce the boot2 binary size further. cheers. alex > > thank you! > > roman -- a13x ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [TESTING]: boot2 changes
On Tue, Mar 01, 2011 at 07:54:14AM -0500, John Baldwin wrote: > On Monday, February 28, 2011 3:39:28 pm Roman Divacky wrote: > > 3) it changes the first keyhit limit to 5 seconds from 3 > >so that constant propagation can take place > > Does this make booting take 2 seconds longer as a result? > > I'm curious as to why '3*FOO' isn't a constant but '5*FOO' is? I worded it wrong, the point being that if the argument is the same in all callsites the compiler can turn it into a constant and propagate that to the function. I will remove this as it saves just 8 bytes... thank you for the review! roman ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: [TESTING]: boot2 changes
On Monday, February 28, 2011 3:39:28 pm Roman Divacky wrote: > 3) it changes the first keyhit limit to 5 seconds from 3 >so that constant propagation can take place Does this make booting take 2 seconds longer as a result? I'm curious as to why '3*FOO' isn't a constant but '5*FOO' is? I think the rest of the patch is fine. -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
[TESTING]: boot2 changes
hi there, I have a patch that shrinks boot2 some: 1) it switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s 2) it changes ioctl to unsigned from uint8_t 3) it changes the first keyhit limit to 5 seconds from 3 so that constant propagation can take place 4) it changes the ticks overflow computation as suggested by bde@ 5) it removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused the patch: http://lev.vlakno.cz/~rdivacky/boot2-almost-there-diet.patch It works for me and I'd like you to review/test this patch thank you! roman pgpJ8XlLqHNgI.pgp Description: PGP signature