Re: where went /dev/kmem?

2008-03-30 Thread Michael Blizek
On 03:20 Sat 29 Mar , Robert P. J. Day wrote: following up on a short article i just read, where is /dev/kmem these days? was it actually deleted? back in 2005, jon corbet was certainly hinting at this: http://lwn.net/Articles/147901/ and i don't see it today on my system, and

Re: shared libs multiple times in ram

2008-03-30 Thread Michael Blizek
On 12:37 Sat 29 Mar , cadetg marco wrote: Hi KernelNewbies! Why are shared libraries hold multiple times in memory even if two processes uses the same libraries? Are they? I've made a little test with firefox and epiphany both are using the same SO --

Re: end_stack?

2008-03-30 Thread Vivek Kutal
Srinivas S wrote: Hi, A newbie question: I see that mm_struct has a field start_stack but not end_stack. I guess that end_stack is located at some constant address for every process. Is this correct? If so where is this address? SP (stack pointer) reg always points to the end so there is no

Re: starting function for kernel process

2008-03-30 Thread Manish Katiyar
On Fri, Mar 28, 2008 at 10:32 AM, ravikumar [EMAIL PROTECTED] wrote: Hi all, As for every program there will be start function( ie main). What is the starting function for kerenl process , ie similarly main(). Hi, I guess it is start_kernel(), this is where the initial kernel command

Re: benefits to likely() and unlikely()?

2008-03-30 Thread Robert P. J. Day
On Sun, 30 Mar 2008, Erik Mouw wrote: On Sat, Mar 29, 2008 at 04:03:18AM -0400, Robert P. J. Day wrote: is there somewhere an actual quantification (is that a word?) to the benefits of likely() and unlikely() in the kernel code? i've always been curious about what difference those

Re: starting function for kernel process

2008-03-30 Thread sahlot arvind
True. but I think before start_kernel what comes into picture lies in head.S. Of course it is arch specific. Thus the actual start up code is in head.S - for i386 it is arch/i386/kernel/head.S for ARM it is arch/arm/kernel/head.S AFAIK from there onwards control jumps to start_kernel () in

Re: Kernel Mode Linux : Execute user processes in kernel mode

2008-03-30 Thread Erik Mouw
On Thu, Mar 27, 2008 at 10:14:23PM +0800, Peter Teoh wrote: This is interesting - contrary to what we usually talked about - UserModeLinux - this is the opposite: URL: http://web.yl.is.s.u-tokyo.ac.jp/~tosh/kml/ It's a great way to be sure a single error in your userland program will indeed

Free ebook: The Little Book of Semaphores, 2nd Edition

2008-03-30 Thread Peter Teoh
http://www.linuxinsight.com/the-little-book-of-semaphores-2nd-edition.html -- Regards, Peter Teoh -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to [EMAIL PROTECTED] Please read the FAQ at http://kernelnewbies.org/FAQ

question on printk() spin_lock()/spin_unlock(): its proper usage

2008-03-30 Thread Peter Teoh
Is there any guidelines on when and where can we insert printk() to do debugging? From definition of printk() it calls vprintk(): kernel/printk.c: asmlinkage int vprintk(const char *fmt, va_list args) { static int log_level_unknown = 1; static char printk_buf[1024];

Re: Question about linux paging mechanism

2008-03-30 Thread Peter Teoh
On Sun, Mar 30, 2008 at 5:55 PM, Wu Yu [EMAIL PROTECTED] wrote: Hi all, AFAIK, for IA-32 arch, two-level paging is sufficient. But the positions of PUD and PMD are kept. In the book Understanding the Linux Kernel, 3rd, it said that kernel set the number of the entries of PUD and

Re: Question about linux paging mechanism

2008-03-30 Thread Peter Teoh
You must also check out the different between kernel address space, and process address space. And this: http://linux-mm.org/LinuxMMDocumentation Last, personally, I find this posting http://lkml.org/lkml/2007/10/10/95 (i386 memory init cleanup) very useful for understanding the codes, as the

Re: question on printk() spin_lock()/spin_unlock(): its proper usage

2008-03-30 Thread Peter Teoh
Thanks Rik, On Mon, Mar 31, 2008 at 12:16 AM, Rik van Riel [EMAIL PROTECTED] wrote: On Sun, 30 Mar 2008 23:24:50 +0800 Peter Teoh [EMAIL PROTECTED] wrote: Is there any guidelines on when and where can we insert printk() to do debugging? You can use it pretty much anywhere. Ahso

Re: question on printk() spin_lock()/spin_unlock(): its proper usage

2008-03-30 Thread Peter Teoh
On Mon, Mar 31, 2008 at 12:53 AM, Peter Teoh [EMAIL PROTECTED] wrote: if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) return 0; Sorry, forgotten to explain the above - which is extracted from lock_acquire() - showing that irq must be disabled before it comes here - right? --

Re: benefits to likely() and unlikely()?

2008-03-30 Thread Daniel Bonekeeper
On 3/30/08, Robert P. J. Day [EMAIL PROTECTED] wrote: On Sun, 30 Mar 2008, Erik Mouw wrote: On Sat, Mar 29, 2008 at 04:03:18AM -0400, Robert P. J. Day wrote: is there somewhere an actual quantification (is that a word?) to the benefits of likely() and unlikely() in the kernel code?

Re: starting function for kernel process

2008-03-30 Thread ravikumar
Mulyadi Santosa wrote: Hi On Fri, Mar 28, 2008 at 12:02 PM, ravikumar [EMAIL PROTECTED] wrote: Hi all, As for every program there will be start function( ie main). What is the starting function for kerenl process , ie similarly main(). other than start_kernel() ... you should be

Re: why set a timer to expire at the current value of jiffies?

2008-03-30 Thread Mulyadi Santosa
Hi On Sun, Mar 30, 2008 at 9:22 PM, Robert P. J. Day [EMAIL PROTECTED] wrote: i'm sure there's a simple answer to this, but what's the value in calling mod_timer() to reset a timer to expire at the current value of jiffies? $ grep -rw mod_timer.*jiffies) *

Re: blktrace debugging: how to use it

2008-03-30 Thread Mulyadi Santosa
Hi.. On Mon, Mar 31, 2008 at 8:42 AM, Peter Teoh [EMAIL PROTECTED] wrote: The is patch is to enable blktrace debugging in the kernel: http://lkml.org/lkml/2006/8/1/405 Can anyone provide any guidelines or references on how to use this feature from userspace? Any tools written to TEST