Re: svn commit: r274088 - head/sys/kern

2014-11-05 Thread Bruce Evans
On Tue, 4 Nov 2014, Ian Lepore wrote: On Wed, 2014-11-05 at 07:46 +1100, Bruce Evans wrote: ... _ALIGNBYTES should probably have type u_long to begin with to reduce the magic. ... So bottom line, define _ALIGNBYTES as (8UL - 1) to minimize the magic? 8UL on 64-bit arches and 8U on 32-bit ar

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Adrian Chadd
... why not just use UMA? -adrian On 4 November 2014 03:29, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Nov 4 11:29:49 2014 > New Revision: 274088 > URL: https://svnweb.freebsd.org/changeset/base/274088 > > Log: > Simplify logic a bit. Ensure data buffer is properly aligned, >

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Ian Lepore
On Wed, 2014-11-05 at 07:46 +1100, Bruce Evans wrote: > On Tue, 4 Nov 2014, Ian Lepore wrote: > > > On Wed, 2014-11-05 at 03:19 +1100, Bruce Evans wrote: > >> [...] > >> Another unsuitable alignment is by the MD ALIGNBYTES macro. This is > >> (sizeof(register_t) - 1) on all arches except mips 32-

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, Ian Lepore wrote: On Wed, 2014-11-05 at 03:19 +1100, Bruce Evans wrote: [...] Another unsuitable alignment is by the MD ALIGNBYTES macro. This is (sizeof(register_t) - 1) on all arches except mips 32-bit where it is 7 sparc64 where it is 15. On arm, it is 3, but arm also h

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Ian Lepore
On Wed, 2014-11-05 at 03:19 +1100, Bruce Evans wrote: > [...] > Another unsuitable alignment is by the MD ALIGNBYTES macro. This is > (sizeof(register_t) - 1) on all arches except mips 32-bit where it is 7 > sparc64 where it is 15. On arm, it is 3, but arm also has > STACKALIGNBYTES = 7. The reg

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Bruce Evans
On Tue, 4 Nov 2014, Mateusz Guzik wrote: On Tue, Nov 04, 2014 at 11:29:49AM +, Hans Petter Selasky wrote: Author: hselasky Date: Tue Nov 4 11:29:49 2014 New Revision: 274088 URL: https://svnweb.freebsd.org/changeset/base/274088 Log: Simplify logic a bit. Ensure data buffer is properly a

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Andrew Turner
On Tue, 4 Nov 2014 12:40:41 +0100 Mateusz Guzik wrote: > On Tue, Nov 04, 2014 at 11:29:49AM +, Hans Petter Selasky wrote: > > Author: hselasky > > Date: Tue Nov 4 11:29:49 2014 > > New Revision: 274088 > > URL: https://svnweb.freebsd.org/changeset/base/274088 > > > > Log: > > Simplify log

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Hans Petter Selasky
On 11/04/14 12:40, Mateusz Guzik wrote: On Tue, Nov 04, 2014 at 11:29:49AM +, Hans Petter Selasky wrote: Author: hselasky Date: Tue Nov 4 11:29:49 2014 New Revision: 274088 URL: https://svnweb.freebsd.org/changeset/base/274088 Log: Simplify logic a bit. Ensure data buffer is properly al

Re: svn commit: r274088 - head/sys/kern

2014-11-04 Thread Mateusz Guzik
On Tue, Nov 04, 2014 at 11:29:49AM +, Hans Petter Selasky wrote: > Author: hselasky > Date: Tue Nov 4 11:29:49 2014 > New Revision: 274088 > URL: https://svnweb.freebsd.org/changeset/base/274088 > > Log: > Simplify logic a bit. Ensure data buffer is properly aligned, > especially for plat