Re: why return from raise_softirq() simply

2010-08-14 Thread Frederic Weisbecker
On Sat, Aug 14, 2010 at 08:57:09PM +0800, Parmenides wrote: > Hi, > > To acitvate a softirq, the raise_softirq() will be invorked. In this > function, in_interruput() function is called, and if we get value 1, > raise_softirq() will return simply. According to ULK3, this situation > indicates eith

Re: Understanding NULL pointer dereference

2010-06-17 Thread Frederic Weisbecker
On Fri, Jun 18, 2010 at 10:11:13AM +0530, Prasad Joshi wrote: > Hi All, > > I am trying to understand a a kernel oops report. Here are some of the > fields from the report > > BUG: unable to handle kernel NULL pointer dereference at 0034 > Oops: [#1] SMP > Pid: 6478, comm: cp Tai

Re: scheduler is a process and driver context?

2010-06-17 Thread Frederic Weisbecker
On Thu, Jun 17, 2010 at 07:30:53PM +0300, Sudipta GHOSH wrote: > Hi, > > Memory management , scheduling is part of core kernel. > > Is it a process or special code resides in RAM? > > As I see init process has PID 0, so the kernel code is a process or > special code. > > when there is an interr

Re: trace_block_remap ?

2010-05-08 Thread Frederic Weisbecker
On Sat, May 08, 2010 at 09:43:23PM +0530, Onkar Mahajan wrote: > What is trace_block_remap , I searched the entire kernel src code but > I was not able to find the definition for this function / macro , how can > anything not defined in the kernel source be called from blk-core.c ? > > Regards, >

Re: tutorials

2010-03-30 Thread Frederic Weisbecker
On Tue, Mar 30, 2010 at 01:05:28PM +0530, Onkar Mahajan wrote: > Hi Kernelnewbies, > Please suggest me a good tutorial for learning basic kernel > programming stuff. Basics such as : > (1) Sending data from kernel => user land > (2) How to trace function calls in kernel ? What do you mea

Re: Allocating memory with spinlock held

2010-03-03 Thread Frederic Weisbecker
On Tue, Mar 02, 2010 at 09:32:16AM +0530, Manish Katiyar wrote: > Hello all, > > Is the following code valid ??? > > foo() { > ... > spin_lock(lock); > ptr = kzalloc(size, GFP_KERNEL); > spin_unlock(lock); > . > } You can't because GFP_KERNEL involves the fact kzalloc might sleep w

Re: access to jiffies_64 atomic or not?

2009-12-30 Thread Frederic Weisbecker
On Tue, Dec 29, 2009 at 09:15:32AM -0500, Robert P. J. Day wrote: > > from kernel/timer.c: > > /* > * The 64-bit jiffies value is not atomic - you MUST NOT read it > * without sampling the sequence number in xtime_lock. > * jiffies is defined in the linker script... > */ > > void do_timer(

Re: pr_debug and "if (0)" statement

2009-09-03 Thread Frederic Weisbecker
On Thu, Sep 03, 2009 at 09:25:40AM +0200, luca ellero wrote: > Bernd Petrovitsch ha scritto: >> On Wed, 2009-09-02 at 15:17 +0530, Anuz Pratap Singh Tomar wrote: >> >>> On Wed, Sep 2, 2009 at 2:30 PM, Bernd Petrovitsch >>> wrote: >>> On Wed, 2009-09-02 at 13:31 +0530, Anuz Pratap Singh Tom

Re: Ftrace

2009-03-19 Thread Frederic Weisbecker
Hi Paolo, On Thu, Mar 19, 2009 at 02:35:13PM +0100, Paolo wrote: > Hi! > I'm using ftrace in order to trace any task or process running. I'm > interesting to the context switch tracing. Ok, I've enabled sched_switch and > the results are in the trace file. > How can I interpretate correctly the re

Re: Challenges Faced by an Amateur Linux Programmer

2009-03-05 Thread Frederic Weisbecker
On Fri, Mar 06, 2009 at 12:58:35AM +0530, Mohit Varma wrote: > Hi, > > I am a Java application programmer trying to get a foothold in the world of > linux programming.My areas of of interest are Device Drivers & network > programming - to play around with protocols to be precise. > > I am facing

Re: a very small problem -- strlen

2009-02-17 Thread Frederic Weisbecker
On Wed, Feb 18, 2009 at 11:00:30AM +0530, nidhi mittal wrote: > hi > a very small doubt may be to ask on forum ... > > i wanted to user strlen in kernel module > for that i will have to include string.h > but as we know > that is a user space library > so what shd i include to use strlen

Re: debugging kernel hang (can't type anything)

2009-02-14 Thread Frederic Weisbecker
On Sat, Feb 14, 2009 at 05:22:06PM +0530, Sukanto Ghosh wrote: > Hi, > > I have made some changes to the memory management part of the kernel > as an experiment. Now when I boot into that kernel and start some > heavy processes (which cause paging), the kernel hangs. I can't even > type anything.

Re: fork system call

2008-12-28 Thread Frederic Weisbecker
On Mon, Dec 29, 2008 at 01:49:18AM +0530, Shyam Burkule wrote: > Hello, > I am sorry for asking silly question. > >In windows basic execution unit is thread, and Linux does not > differentiate between thread and process( I mean Linux doesn't give special > treatment for thread essentially