handling received FISes in SATA driver & libATA !!!

2010-08-09 Thread Murali N
Hi, I am new to SATA driver development. Here i have few questions. I am able to understand how SATA driver will send FISes to device. I would like to know how the received FISes are handled in case of FISes come from the device? These FISes are copied in a special area whose base address is giv

spin_lock_bh and spin_lock_irqsave

2010-08-09 Thread Daniel (Youngwhan) Song
Hi, As far as I understand, spin_lock_bh will disable all softirqs and spin_lock_irqsave will disable all interrupts and save the flags. #1. - One interesting I found is that many drivers use spin_lock_irqsave in their ioctl and their bottom-half routine rather than spin_lock_bh in even bott

Re: applying atomic assignment in which situation

2010-08-09 Thread Dave Hylands
Hi, On Mon, Aug 9, 2010 at 6:15 AM, Parmenides wrote: > Hi, > >   In the following code excerpt of kernel, why the 'count' field is > set by atomic_set while other fields of tha same structure can take an > assignment directly? It depends on how the variables are used. > void tasklet_init(struc

Re: kernel page caching questions

2010-08-09 Thread Philip Downer
Syed Khader wrote: I'm developing a kernel module (sorry under nda till product release so no code available) which is currently allocating ~6MB of buffers (3 x 2MB buffers) with pci_alloc_consistent for dma usage, it will be less later on but for now the hardware requires this. Is sw

Re: kernel page caching questions

2010-08-09 Thread Syed Khader
>>> I'm developing a kernel module (sorry under nda till product release so >>> no code available) which is currently allocating ~6MB of buffers (3 x >>> 2MB buffers) with pci_alloc_consistent for dma usage, it will be less >>> later on but for now the hardware requires this. >>> >> Is swap enable

Re: multiple streaming servers in a cloud

2010-08-09 Thread Mulyadi Santosa
On Mon, Aug 9, 2010 at 17:00, Tapas Mishra wrote: > Probably some one on this list may give me some idea to which > direction I should look or think. > This question is not for kernel development but it is a problem I > am facing. > > I have multiple video streaming servers running on my LAN. Eve

Re: Debug the Kernel

2010-08-09 Thread Mulyadi Santosa
On Mon, Aug 9, 2010 at 21:42, Harsh Kumar wrote: > Hi, > I am new to Kernel Programming and would like to know whats the best way to > start understanding the code structure. > Is debugging the kernel possible by putting breakpoints? > Can someone of you please help me start. None of the method i

Re: Debug the Kernel

2010-08-09 Thread shailesh jain
http://stackframe.blogspot.com/2007/04/debugging-linux-kernels-with.html This works great for me. Shailesh Jain Disclosure: I have lot to do with the company. On Mon, Aug 9, 2010 at 7:42 AM, Harsh Kumar wrote: > Hi, > I am new to Kernel Programming and would like to know whats the best

Re: applying atomic assignment in which situation

2010-08-09 Thread Mulyadi Santosa
Hi... On Mon, Aug 9, 2010 at 20:15, Parmenides wrote: > Furthermore, the definition of atomic_set is as follows > > #define atomic_set(v,i)         (((v)->counter) = (i)) > > and there is seemingly no 'atomic feature' at all. You bet...however, IIRC, atomic type in x86 32 bit is unsigned long an

RE: applying atomic assignment in which situation

2010-08-09 Thread Castillo Fuentes, David
Hi, You know, the most important point of doing variables atomic is to avoid race conditions when writing simple variables/Entities in a Multithreading code, but you are right in the macro definition you mentioned below, which doesn't appear to be atomic at all. You know, the best way of d

Re: Debug the Kernel

2010-08-09 Thread Victor Rodriguez
On Mon, Aug 9, 2010 at 9:42 AM, Harsh Kumar wrote: > Hi, > I am new to Kernel Programming and would like to know whats the best way to > start understanding the code structure. > Is debugging the kernel possible by putting breakpoints? > Can someone of you please help me start. > > Regards, > Hars

Re: applying atomic assignment in which situation

2010-08-09 Thread David Castillo Fuentes
Hi, You know, the most important point of doing variables atomic is to avoid race conditions when writing simple variables/Entities in a multi-threading code, but you are right in the macro definition you mentioned below, which doesn’t appear to be atomic at all. You know, the best way of doing t

RE: applying atomic assignment in which situation

2010-08-09 Thread Castillo Fuentes, David
Posting again since seems that my email box is not working properly. From: Castillo Fuentes, David Sent: Monday, August 09, 2010 9:56 AM To: 'Parmenides'; kernelnewbies@nl.linux.org Subject: RE: applying atomic assignment in which situation Hi, You know, the m

Debug the Kernel

2010-08-09 Thread Harsh Kumar
Hi, I am new to Kernel Programming and would like to know whats the best way to start understanding the code structure. Is debugging the kernel possible by putting breakpoints? Can someone of you please help me start. Regards, Harsh Kumar

applying atomic assignment in which situation

2010-08-09 Thread Parmenides
Hi, In the following code excerpt of kernel, why the 'count' field is set by atomic_set while other fields of tha same structure can take an assignment directly? void tasklet_init(struct tasklet_struct *t, void (*func)(unsigned long), unsigned long data) { t->func = f

Re: kernel page caching questions

2010-08-09 Thread Philip Downer
Hi Mulyadi, Thanks for the response. Mulyadi Santosa wrote: On Sun, Aug 8, 2010 at 22:13, Philip Downer wrote: Hi folks, I'm developing a kernel module (sorry under nda till product release so no code available) which is currently allocating ~6MB of buffers (3 x 2MB buffers) with pci_allo

multiple streaming servers in a cloud

2010-08-09 Thread Tapas Mishra
Probably some one on this list may give me some idea to which direction I should look or think. This question is not for kernel development but it is a problem I am facing. I have multiple video streaming servers running on my LAN. For different subdomains. i.e. site1.mydomain.com site2.mydoma