All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo van Lil <inguin@gmx.de>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero
Date: Tue, 05 Aug 2008 00:07:01 +0200	[thread overview]
Message-ID: <48977D85.8050505@gmx.de> (raw)
In-Reply-To: <20080804214731.GA18697@c2.user-mode-linux.org>

Jeff Dike schrieb:

>> Hmmm... so I have cpu0 similar to yours. What version
>> of UML and libc do you have?
> 
> UML 2.6.26 and an older libc:
> 
> % ls -l /lib/libc.so.6
> lrwxrwxrwx 1 root root 11 Jun  2  2007 /lib/libc.so.6 -> libc-2.5.so
> 
> Looking through libc at
> 
> http://www.google.com/codesearch?hl=en&q=file:\.c%24+\"/stat\"+package:http://su-se.lunar-linux.org/lunar/mirrors/glibc-2.3.3-cvs-20040708.tar.bz2+show:m1O9RV1wlw4:qbkros5194A:MbxD3_8dUHU&sa=N&cd=1&ct=rc&cs_p=http://su-se.lunar-linux.org/lunar/mirrors/glibc-2.3.3-cvs-20040708.tar.bz2&cs_f=glibc-2.3.3-cvs-20040708/sysdeps/unix/sysv/linux/getsysstats.c
> 
> I see it counting cpu<n> lines in /proc/stat, which is what I'm
> seeing.  It will also look at /proc/cpuinfo.  Can you strace your
> version and see if it's looking there at all?

More recent versions of glibc (here: 2.8 on Fedora 9) seem to look at 
the contents of /sys/devices/system/cpu instead. That directory is empty 
in UML, which might explain the odd result from Stanislav's program.

Cheers,
Ingo

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

      parent reply	other threads:[~2008-08-04 22:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-04 13:58 [uml-devel] sysconf(_SC_NPROCESSORS_CONF) returning zero Stanislav Meduna
2008-08-04 20:33 ` Jeff Dike
2008-08-04 20:59   ` Stanislav Meduna
2008-08-04 21:47     ` Jeff Dike
2008-08-04 22:06       ` Stanislav Meduna
2008-08-04 22:07       ` Ingo van Lil [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48977D85.8050505@gmx.de \
    --to=inguin@gmx.de \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.