NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/44620: /proc/stat broken after acpi changes (?) and only shows one CPU in amd64-current



hi,

>  The `/proc/stat' code depends on MULTIPROCESSOR define/option which is
>  not set when standalone module is build.
>  
>  While it's easy to fix for both i386 and amd64 where MULTIPROCESSOR is
>  mandatory for quite some time, i'm not sure how to properly handle it
>  for other archs ...

there's no point to have the MULTIPROCESSOR check in procfs these days.
CPU_INFO_FOREACH should just work for the !MULTIPROCESSOR case.

there are archs which has optimized-version of CPU_INFO_FOREACH for
!MULTIPROCESSOR, tho.  IMO it isn't worth to have this kind of micro
optimizations.  performance critical code should not iterate cpus anyway.

YAMAMOTO Takashi


Home | Main Index | Thread Index | Old Index