svn commit: r335223 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Fri Jun 15 21:34:35 UTC 2018


I'm all for these sysctls becoming %intr_cpus and %local_cpus and being
filled up by the device's parent automatically.  But I'd like to tweak
the output a bit so that it can be fed directly to cpuset -l.

Regards,
Navdeep

On 06/15/18 14:14, Conrad Meyer wrote:
> This seems generally useful, and nothing about the code is specific to
> cxgbe.  Could it be adapted to be driver-agnostic?
> 
> Thanks,
> Conrad
> 
> On Fri, Jun 15, 2018 at 11:04 AM, Navdeep Parhar <np at freebsd.org> wrote:
>> Author: np
>> Date: Fri Jun 15 18:04:44 2018
>> New Revision: 335223
>> URL: https://svnweb.freebsd.org/changeset/base/335223
>>
>> Log:
>>   cxgbe(4): sysctls to display the local and intr CPUs for the adapter.
>> ...
>> +}
>> +
>> +static int
>> +sysctl_cpus(SYSCTL_HANDLER_ARGS)
>> +{
>> ...
>> +       rc = bus_get_cpus(sc->dev, op, sizeof(cpuset), &cpuset);
>> +       if (rc != 0)
>> +               return (rc);
>> +
>> ...
>> +       CPU_FOREACH(i)
>> +               sbuf_printf(sb, "%d ", i);
>> +       rc = sbuf_finish(sb);
>> +       sbuf_delete(sb);



More information about the svn-src-head mailing list