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 <[email protected]> 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);

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to