Date: Thu, 29 May 2014 11:24:45 -0700 From: Adrian Chadd <adrian@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Attilio Rao <attilio@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>, Jia-Shiun Li <jiashiun@gmail.com>, Alan Somers <asomers@freebsd.org>, Tim Bishop <tim-lists@bishnet.net> Subject: Re: Processor cores not properly detected/activated? Message-ID: <CAJ-VmonQOafnYB=xhUZnkU0c_qFVw8ZFSRkAbnpA%2B3NV8qt2ww@mail.gmail.com> In-Reply-To: <201405291318.36130.jhb@freebsd.org> References: <20140524014713.GF13462@carrick-users.bishnet.net> <201405281358.35924.jhb@freebsd.org> <CAJ-VmomzDWHTZ_En5PUGrse%2B3oFyXksPWB5OHx7_US_Or6vW6Q@mail.gmail.com> <201405291318.36130.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 May 2014 10:18, John Baldwin <jhb@freebsd.org> wrote: >> > It costs wired memory to increase it for the kernel. The userland set size >> > can be increased rather arbitrarily, so we don't need to make it but so large >> > as it is easy to bump later (even with a branch). >> >> Well, what about making the API/KBI use cpuset_t pointers for things >> rather than including it as a bitmask? Do you think there'd be a >> noticable performance overhead for the bits where it's indirecting >> through a pointer to get to the bitmask data? > > The wired memory is not due to cpuset_t. The wired memory usage is due to things > that do 'struct foo foo_bits[MAXCPU]'. The KBI issues I mentioned above are > 'struct rmlock' (so now you want any rmlock users to malloc space, or you > want rmlock_init() call malloc? (that seems like a bad idea)). The other one > is smp_rendezvous. Plus, it's not just a pointer, you really need a (pointer, > size_t) tuple similar to what cpuset_getaffinity(), etc. use. Why would calling malloc be a problem? Except for the initial setup of things, anything dynamically allocating structs with embedded things like rmlocks are already dynamically allocating them via malloc or uma. There's a larger fundamental problem with malloc, fragmentation and getting the required larger allocations for things. But even a 4096 CPU box would require a 512 byte malloc. That shouldn't be that hard to do. It'd just be from some memory that isn't close to the rest of the lock state. -a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonQOafnYB=xhUZnkU0c_qFVw8ZFSRkAbnpA%2B3NV8qt2ww>