lkml.org 
[lkml]   [2008]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is sysfs the right place to get cache and CPU topology info?
On Wed, 2 Jul 2008 19:45:43 +1000 Paul Mackerras <paulus@samba.org> wrote:

> > Well it's up to them - they own the files. If they later change them
> > and break their own interfaces (and presumably their own applications),
> > well, perhaps they have chosen an inappropriate career?
>
> We have too many "they"s, perhaps. I meant that these developers (of
> an HPC library that wants to know about cpu caches and topology) see
> sysfs as being completely useless as a source of information because
> they expect random kernel developers to keep changing it in
> incompatible ways. So "they" (library developers) don't own the files
> - they're not kernel developers at all.

Oh. I thought "they" (or you) were proposing adding some new
topology-exporting files to sysfs.

If they're talking about using the existing ones then sure, those are
cast in stone as far as I'm concerned.

But they do need to be a _bit_ defensive. If they see a file which has
multiple name:value fields (shouldn't happen) then don't fail if new
tuples turn up later on. Don't expect them to always be in the same
order. Don't fail if new files later turn up in a sysfs directory. If
a file has (a stupid) format like /proc/self/stat then be prepared for
new columns to appear later on, etc.

But if basic and obvious steps like that are taken in the library, and
later kernel changes cause that library to break, we get to fix the
kernel to unbreak their library.


\
 
 \ /
  Last update: 2008-07-02 12:05    [W:0.174 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site