RE: capturing kernel oops

2010-12-16 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Paavaanan
> Sent: Friday, December 17, 2010 11:26 AM
> To: Kernelnewbie
> Subject: capturing kernel oops
> 
> Hi,
> 
> kernel Panic and Crashes can be logged and traced with the help of
> tools
> like core-dump, klogd and netdump. But, is there any way to take
> logs or
> crash dumps to Kernel OOPS messages. Instead of taking a Photo with
> the
> Camera is there any handy tool to do this neatly.

Attaching a serial console can be one option, if we want to see the kernel oops 
when it occurs. Else the logs go to 'dmesg' messages as well.
I am not quite sure if we require to set certain printk level 
/proc/sys/kernel/printk.

> 
> Thanks,
> Paavaanan.
> 



RE: Getting net_device structure

2010-12-06 Thread Tayade, Nilesh
>From: kernelnewbies-bou...@nl.linux.org
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of sugnan prabhu
>Sent: Monday, December 06, 2010 12:42 PM
>To: kernelnewbies@nl.linux.org
>Subject: Getting net_device structure
>
>
>Hello,
>  how to get the net_device structure if the interface name is
known.

Searching through the kernelnewbies mail archives I could get this- 
http://mail.nl.linux.org/kernelnewbies/2010-09/msg00251.html

And probably google would be easier.

>
>---
>Thanking You,
>Sugnan Prabhu S
>http://sugnanprabhu.blogspot.com/



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: hi

2010-11-18 Thread Tayade, Nilesh
From: kernelnewbies-bou...@nl.linux.org 
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Anuz Pratap 

> On Thu, Nov 18, 2010 at 6:46 PM, Carlo Caione  wrote:

>> On Nov 18, 2010, at 5:23 PM, Viral Mehta wrote:

>>> Seems like kernelnewbies is becoming more popular than Google
>>> It looks like some "Google Query" which showed up in kernel list :D

>> +1 :)
 
> I guess as soon as someone subscribes to mailing list, s/he should be sent 
> with some guidelines, which can prevent this from happening. 
> good idea would be  if we can make a list of such dos and do-nots.  

Guess we already have the link describing the common etiquettes.
http://www.tux.org/lkml/#s3 - Partially applicable to our list as well.

Also as Mulyadi pointed out: http://www.catb.org/esr/faqs/smart-questions.html.

--
Thanks,
Nilesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Kernel start code

2010-10-07 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Himanshu Chauhan
> Sent: Wednesday, October 06, 2010 11:50 PM
> To: Sri Ram Vemulpali
> Cc: Kernel-newbies
> Subject: Re: Kernel start code
> 
> On Thursday 07 October 2010 04:28 AM, Sri Ram Vemulpali wrote:
> > Hi all,
> >
> >Can anyone, please help me on pointing to kernel boot code
> after
> > grubs loads the kernel and transfers control to it.
> >I want in which files this resides, location. Any explanation
> on the
> > code or any link would be helpful to me.
> >I know this is kind of lousy question, but entry.S is where I
> looked
> > at. It is overwhelming for me where to start in that file.
> >Thanks in advance.
> >
> >
> Hi Sri,
> 
> Use cscope and search for "kernel_entry" symbol. I think its in
> arch/$ARCH/boot/head.S or may in in kernel directory.

I would recommend refer Linux Kernel Primer- it explains boot process 
line-by-line for X86 and PPC.
http://www.amazon.com/Linux-Kernel-Primer-Top-Down-Architectures/dp/0131181637


> 
> - Himanshu
> 

--
Thanks,
Nilesh



N�r��yb�X��ǧu�ޙ���+a�{.n�+���z�ޖw�n'j�b�ye�{������z��v�^�m���z�ޖw�n'���?

RE: memory consumed by kernel

2010-09-23 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Arun KS
> Sent: Thursday, September 23, 2010 11:30 AM
> To: kernelnewbies@nl.linux.org
> Subject: memory consumed by kernel
> 
> Hello There,
> 
> cat /proc/meminfo will show the memory statistics of the entire
> system.
> 
> Is there a way to see the memory consumed by the kernel alone?

I do not have thorough idea. But it seems there is no ready-made tool
(userspace/kernelspace) to know the complete kernel memory.
To debug certain memory related issues - we can refer the /proc/kallsyms
(exact place where each symbol is loaded in memory) and /proc/slabinfo -
the slab allocation for different objects. But considering the total
kernel memory it also includes many other allocations which we do not do
explicitly - like Page tables, or some kind of metadata. 

> 
> Regards,
> Arun
> 

--
Thanks,
Nilesh





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Context of a kernel routine

2010-09-20 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Mulyadi Santosa
> Sent: Sunday, September 19, 2010 8:13 AM
> To: Vimal
> Cc: Kernel Newbies
> Subject: Re: Context of a kernel routine
> 
> Hi..
> 
> On Sun, Sep 19, 2010 at 08:50, Vimal  wrote:
> > Most of the times, I just end up tracing the code path manually
> from
> > the source code.  I have another question, though:  Is it possible
> in
> > gdb to break on all function calls?  Would be useful. :)
> 
> 
> None that I know :) But maybe that is doable inside system emulator
> such as Qemu. You need to trap the call of "call", "far jmp" or
> things
> like that. But the problem here is it is done system widely...thus
> you
> need a way to selectively filter which function calls you want to
> trap
> and which ones are not

Regarding the code trace:
Another approach which I used to use. It's ugly but worked for me most of the 
times. :-)
We can use stack_trace()/dump_stack() functions (same routines which get called 
when kernel panics or Oops). Pass the stack pointer as NULL and it will dump 
the stack, register set of current process. 

Question is if it gets called multiple times and flood the console? 
You can create a sysctl entry - enable it (non-zero) from command prompt, once 
you get the expected trace - make sysctl_variable = 0 (will disable the 
function calls) :-)

Something like: 
if(sysctl_variable)
stack_trace(NULL); 

> 
> --
> regards,
> 
> Mulyadi Santosa
> Freelance Linux trainer and consultant
> 
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> 

--
Thanks,
Nilesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: filesystem or database??

2010-09-16 Thread Tayade, Nilesh
Hi Mohit,

Probably what you want to check is http://www.linux.org/docs/ 
There is a list of FAQs that can help: 
http://www.tldp.org/FAQ/Linux-FAQ/index.html
Mailing lists where you can post queries: http://www.linux.org/docs/lists.html
[Hint: First link in google search "Linux distributions list"].

Lastly, it would be helpful for us if we use this mailing list for kernel 
related discussions and not for the distro and installation HOWTOs.

--
Thanks,
Nilesh

> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Srdjan Todorovic
> Sent: Friday, September 17, 2010 1:40 AM
> To: mohit verma
> Cc: kernelnewbies
> Subject: Re: filesystem or database??
> 
> On 16 September 2010 20:58, mohit verma 
> wrote:
> > when we install any package (like  in  ubuntu) ,at end the
> terminal shows
> > "reading database" . the idea i got by my friend is that package
> manager
> > uses this database (like .deb or rpm).
> > but my question is : everything in linux is a file so it(database
> or files
> > that it contains) must be placed somewhere in the  filesystem.what
> is the
> > difference  if i say that package manager accesses nothing but the
> > filesystem ( obviously a part of it) and database of a system(
> computer ) is
> > nothing but  the filesystem (part of it ) itself  ?
> > i mean: what differs between these two that imposes us to name
> them
> > differently?
> 
> The database will probably be in a file (ie. Sleepycat db files), or
> be made up of several files (IIRC this is like MySql).
> 
> But I suspect this is not the best mailing list to discuss this -
> seems more like general Linux systems use, or applications-level
> development question.
> 
> Regards,
> Srdjan
> 
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecar...@nl.linux.org
> Please read the FAQ at http://kernelnewbies.org/FAQ



RE: my driver is dropping characters

2010-09-15 Thread Tayade, Nilesh
Can't it be because you are using size = 1byte in copy_from_user? Make it 
'count'.

--
Thanks,
Nilesh

-

From: kernelnewbies-bou...@nl.linux.org 
[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Bond
Sent: Wednesday, September 15, 2010 5:27 PM
To: kernelnewbies
Subject: my driver is dropping characters

I wrote my hello world type of character device driver.(First driver that I 
wrote)
I created a device as follows

mknod /dev/bond c 60 0
and then tried to write something to that device as follows
echo -n abcde > /dev/bond


cat /dev/bond
will show me the last
e of entered abcde
above but will drop abcd.
I can see the last character which was passed on to as argument to echo but not 
the previous characters.

Any idea what improvement should I make.
Here is the code.

#include 
#include 
#include  /* printk() */
#include  /* kmalloc() */
#include  /* everything... */
#include  /* error codes */
#include  /* size_t */
#include 
#include  /* O_ACCMODE */
#include  /* cli(), *_flags */
#include  /* copy_from/to_user */




/* Declaration of memory.c functions */
int bond_open(struct inode *inode, struct file *filp) { return 0;};
int bond_release(struct inode *inode, struct file *filp){ return 0;};
ssize_t bond_read(struct file *filp, char *buf, size_t count, loff_t *f_pos)
{
 
  /* Transfering data to user space */
  copy_to_user(buf,bond_buffer,1);


  /* Changing reading position as best suits */
  if (*f_pos == 0) {
    *f_pos+=1;
    return 1;
  } else {
    return 0;
  }
};




ssize_t bond_write(struct file *filp, char *buf, size_t count, loff_t *f_pos)
 {


  char *tmp;


  tmp=buf+count-1;
  copy_from_user(bond_buffer,tmp,1);
  return 1;
} ;
void bond_exit(void);
int bond_init(void);


/* Structure that declares the usual file */
/* access functions */
struct file_operations bond_fops = {
  read: bond_read,
  write: bond_write,
  open: bond_open,
  release: bond_release
};


/* Global variables of the driver */
/* Major number */
int bond_major = 60;
/* Buffer to store data */
char *bond_buffer;


static int bond_init(void) {
  printk("<1> Hello bond new driver!\n");
 int result;


  /* Registering device */
  result = register_chrdev(bond_major, "bond", &bond_fops);
  if (result < 0) {
    printk(
  "<1>memory: cannot obtain major number %d\n", bond_major);
    return result;
  }


  /* Allocating memory for the buffer */
  bond_buffer = kmalloc(1, GFP_KERNEL);
  if (!bond_buffer) {
    result = -ENOMEM;
    goto fail;
  }
  memset(bond_buffer, 0, 1);


  printk("<1>Inserting bond module\n");
  return 0;


  fail:
    bond_exit();
    return result;
  return 0;
 }


static void bond_exit(void) {
  printk("<1> Bye, bond world\n");
/* Freeing the major number */
  unregister_chrdev(bond_major, "bond");


  /* Freeing buffer memory */
  if (bond_buffer) {
    kfree(bond_buffer);
  }


  printk("<1>Removing bond module\n");




}


module_init(bond_init);
module_exit(bond_exit);



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: spin locks in uniprocessor system

2010-09-15 Thread Tayade, Nilesh
> -Original Message-
> From: Smital Desai [mailto:smital.de...@lntinfotech.com]
> Sent: Wednesday, September 15, 2010 12:58 PM
> To: Tayade, Nilesh; Kernel Newbies
> Subject: RE: spin locks in uniprocessor system
> 
> 

> 
> >>On uniprocessor system even if you have a task scheduled, the
> interrupt
> >>can still come and should be handled by that processor. So let's
> say you
> >>get a timer interrupt - the schedule() will be called on return
> and if
> >>there is any higher priority task waiting, your previous task can
> get
> >>scheduled out.
> >>This is referred to as pseudo concurrency (Please refer Robert
> Love).
> 
>  ok .. i might sound silly but in this case too.. When the
> second task tries to acquire
>  the same spin lock , it will again cause the processor to spin
> continuously hogging it completely ..
>  then how does the first task gets a chance to execute and
> release the spin lock.
> 
 
CMIIW, pertaining to the uniprocessor system, the first task will get a
chance only when it has priority greater than any other tasks. To avoid
such things, maybe we can go for non-blocking operations before
acquiring spinlock.
int spin_trylock(spinlock_t *lock);
int spin_trylock_bh(spinlock_t *lock);


--
Thanks,
Nilesh




--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: spin locks in uniprocessor system

2010-09-15 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Smital Desai
> Sent: Wednesday, September 15, 2010 11:58 AM
> To: Kernel Newbies
> Subject: spin locks in uniprocessor system
> 
> Hi everyone,
> 
> It's an extract in LDD3 , regarding spink lock. I have put my query
> in brackets.
> 
> Spinlocks are, by their nature, intended for use on multiprocessor
> systems, although a uniprocessor workstation running a preemptive
> kernel behaves like SMP, as far as concurrency is concerned.
> ( I need to understand , how this is true with an example preferably
> )

On uniprocessor system even if you have a task scheduled, the interrupt
can still come and should be handled by that processor. So let's say you
get a timer interrupt - the schedule() will be called on return and if
there is any higher priority task waiting, your previous task can get
scheduled out.
This is referred to as pseudo concurrency (Please refer Robert Love).

> 
> If a nonpreemptive uniprocessor system ever went into a spin on a
> lock, it would spin forever; no other thread would ever be able to
> obtain the CPU to release the lock. For this reason, spinlock
> operations on uniprocessor systems without pre-emption enabled are
> optimized to do nothing, with the exception of the ones that change
> the IRQ masking status.
> ( I don't get the meaning of last sentence "with the exception of
> .." Please can somebody explain )
> 

I am not sure about this statement, though. Would appreciate if someone
can provide some pointers.

> 
> Thanks and Regards
>  Smital Desai
> 


--
Thanks,
Nilesh





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Struct net_device

2010-09-13 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Tushar Dadlani
> Sent: Monday, September 13, 2010 8:56 PM
> To: kernelnewbies@nl.linux.org
> Subject: Struct net_device
> 
> Hi ,
> 
> I wanted to know how do I use eth0 from kernel space. How do i get
> the
> information of running struct net_device references??
> 
> I wanted to capture the stats on eth0 from kernel space.
> 

I am really not sure what is required here. Please see if below info.
helps (not an expert comment, though :)).
You can get the netdev struct of the interface by name: 

struct net_device *netdev = dev_get_by_name("eth0"); // when
netdev->name is eth0.
struct e1000_adapter *adapter = netdev_priv(netdev); // obtain the
adapter.

And you also can take a look at e1000_ethtool.c to obtain the stats for
each interface using the adapter.
Hope it helps.

> --
> Tushar Dadlani
> Manipal Institute of Technology
> +919986292434
> 

--
Thanks,
Nilesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: knowledge sharing

2010-09-09 Thread Tayade, Nilesh
> From: kernelnewbies-bou...@nl.linux.org 
> [mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Bond
> Sent: Thursday, September 09, 2010 12:24 PM
> To: kernelnewbies
> Subject: Re: knowledge sharing


> On Thu, Sep 9, 2010 at 12:01 PM, Tayade, Nilesh  
> wrote:

>> There is a lot of material available opensource.
> That exactly is the problem.Which one to read and which one not to read.
> To be able to search some thing you need to be aware of what to be searched.
Agreed. But you can question yourself to know that.
 
>> And then practice.
> practice what?
> Suppose I decided I want to write a driver for my monitor of my computer.
> Now will that be some thing good to start with.

Certainly not. Atleast not for the _newbies_. :)

> I just want to know some thing kick off.
Suggestion - google. Something to kick off- start from what operating system 
really is. 


--
Thanks,
Nilesh



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: knowledge sharing

2010-09-08 Thread Tayade, Nilesh
> From: kernelnewbies-bou...@nl.linux.org 
> [mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of Bond
> Sent: Thursday, September 09, 2010 8:27 AM
> To: kernelnewbies
> Subject: knowledge sharing

> It would good if some senior members on the list share their knowledge in 
> form of some sort of programming exercise on this list.
> For example decide a topic for a week and discuss about that topic in the 
> week.
> Starting from some one who is absolutely new to kernel development.
> (Having said that I have written basic hello kernel and  character device 
> driver for myself)

I really appreciate your suggestion and (hopefully) understood what you are 
pointing to. And nice to see you started with basics.

> If like this people can continue such a thing here that will be a bit helpful 
> to those people who do not have any thing to do with IT or IT organizations 
> but are interested 

But let me be clear about the notion of kernel mailing lists- It's like you do 
the stuffs on your own. There is a lot of material available opensource. Read, 
read and read. And then practice. And _certainly_ there are many things which 
everyone can't understand. Try to solve these issues on your own (and probably 
post it to the mailing list, unless it's an obvious thing!). If you are really 
stuck somewhere or want to contribute something and seeking opinion that's what 
the mailing list is for.

--
Thanks,
Nilesh





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: Query related to mount point identification.

2010-09-07 Thread Tayade, Nilesh
> -Original Message-
> From: Manish Katiyar [mailto:mkati...@gmail.com]
> Sent: Tuesday, September 07, 2010 10:51 PM
> To: Tayade, Nilesh
> Cc: kernelnewbies@nl.linux.org
> Subject: Re: Query related to mount point identification.
> 
> On Tue, Sep 7, 2010 at 4:27 AM, Tayade, Nilesh
>  wrote:
> > Hi,
> >
> > I am currently working on parsing the packets for NFS protocol. I
> want
> > to know, in case of a file operation, how can we identify the
> mount
> > point where the file is mounted?
> >
> > E.g. scenario is-
> > Client has mounted the node already. You apply the NFS parser and
> start
> > reading/writing to the file. Here, parser did not know if the node
> is
> > mounted or not (as we enabled the parser after mounting the node.
> And I
> > want to identify that at the arrival of first packet). So is there
> any
> > way to identify that based on the file name (or inode may be)? I
> am
> > looking at the fstat() system call, but unable to find anything
> useful.
> 
> Looks like given the filename you want to find the mountpoint. May
> be
> this will help.
> http://www.mail-archive.com/bug-coreut...@gnu.org/msg20630.html

Thanks, it looks useful. The changes are recent, though.

> 
> 
> --
> Thanks -
> Manish
> ==
> [$\*.^ -- I miss being one of them
> ==


--
Thanks,
Nilesh




--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Query related to mount point identification.

2010-09-07 Thread Tayade, Nilesh
Hi,

I am currently working on parsing the packets for NFS protocol. I want
to know, in case of a file operation, how can we identify the mount
point where the file is mounted? 

E.g. scenario is-
Client has mounted the node already. You apply the NFS parser and start
reading/writing to the file. Here, parser did not know if the node is
mounted or not (as we enabled the parser after mounting the node. And I
want to identify that at the arrival of first packet). So is there any
way to identify that based on the file name (or inode may be)? I am
looking at the fstat() system call, but unable to find anything useful. 

Any pointers will be highly appreciated.

--
Thanks,
Nilesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



RE: A question

2010-09-02 Thread Tayade, Nilesh
[Resending, I'm not sure where the previous email is lost.]

>From: kernelnewbies-bou...@nl.linux.org 
>[mailto:kernelnewbies-bou...@nl.linux.org] On Behalf Of hiren panchasara
>Sent: Thursday, September 02, 2010 12:28 PM
>To: Prabhu nath
>Cc: kernelnewbies@nl.linux.org; techtrain...@tataelxsi.co.in
>Subject: Re: A question
>
>Thanks a lot Prabhu for great explanation, comments in-line:
>On Wed, Sep 1, 2010 at 10:02 PM, Prabhu nath  wrote:
>Interrupt context is a loaded term. It is used for both top-half and 
>bottom-half processing.
>I need some more reading, will do that :)
>

[Nilesh] Also request you to keep the subject line quite specific. :)

>
>Linux defines two terms in the top-half, one is Interrupt handler (IH) and 
>Interrupt Service Routine (ISR).
>Interrupt handler is a standard kernel code that is executed by the processor 
>once the interrupt is generated. To abstract it, this generic code is executed 
>for all the generated interrupts. This, in general saves the present processor 
>context and paves way for the execution of ISR.
>ISR is a interrupt service routine written by a device driver programmer to 
>handle the interrupt of a device. ISR is mainly responsible to verify the 
>status register of a device to find out the cause of the interrupt and act 
>accordingly.
>
>Both IH and ISR will not have a context of its own. Interrupts generated by a 
>hardware device is asynchronous. i.e. it can be generated at any point in time.
>When such a interrupt is generated, the current execution is interrupted and 
>the execution  control is transferred to IH and ISR will be executed. Thus we 
>can infer that both IH and ISR will be executing in an anonymous context.
>I am struggling to find meaning of interrupt context now.
>

[Nilesh] Context refers to several stuffs that play role in execution . the 
registers, the stack etc. etc.
http://book.chinaunix.net/special/ebook/Linux_Kernel_Development/0672327201/ch06lev1sec5.html

>
>
>For Eg. Consider there are 3 tasks T2, T3. Suppose T2 invoked a read system 
>call to read data from the secondary media (say hard disk), driver of the hard 
>disk will initiate the device to gather the data and put task T2 in the wait 
>queue and invokes scheduler. Now, scheduler picks up say T3. When processor is 
>executing task T3, there was interrupt generated by the harddisk controller 
>indicating that data is ready. At this point IH and ISR is executed. IH and 
>ISR of this interrupt has no relevance to task T3, but still it is executed in 
>the context of T3. Hence we say that IH and ISR will always be executed in the 
>anonymous context.
>Wow, didnt know this. So IH and ISR wont execute in interrupt context? What is 
>interrupt context then? and if they execute in context of T3, does it have any 
>side-effect on processing of T3?
>

[Nilesh] May be I am not able to completely interpret what is written above. 
AFAIK, when the task is scheduled out in order to handle interrupt, the stack 
used is different for the interrupt (current pointer still points to the 
task_struct of the task, but that.s irrelevant for interrupt). Also the 
registers are stored (context switch?) when the process is scheduled out. I am 
not sure how it should run task T3 context. Could someone please clarify?

>
>
>Most of the bottom half execution happens the same way, i.e. it will be 
>executing in the anonymous context unless the job of bottom half is relegated 
>to respective kernel threads. In the latter case the bottom half execution 
>will have its own context.
>
>For more details about top-half and bottom half, refer ULK 3rd edtion by 
>Bovet, Chapter 4
>Would read it.
>
>Thanks again for great insights.
>
>Regards,
>Prabhu

Thanks,
Nilesh


RE: A question

2010-09-01 Thread Tayade, Nilesh
> -Original Message-
> From: kernelnewbies-bou...@nl.linux.org [mailto:kernelnewbies-
> bou...@nl.linux.org] On Behalf Of Hiren Panchasara
> Sent: Wednesday, September 01, 2010 9:08 PM
> To: kernelnewbies@nl.linux.org
> Subject: A question
> 
> Process context is schedulable but interrupt context is not. Why and
> how?

Interrupt line can be shared by multiple interrupts or to avoid delay in
handling subsequent interrupts on single line - the handler has to be
quick enough. So we avoid scheduling out or sleeping inside the
interrupt handlers.

> Any examples I can look at?


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



NFS version4 maximum on-the-wire data size.

2010-09-01 Thread Tayade, Nilesh
Hi,

I am unable to get the exact count for the amount of on-the-wire data
size that NFSv4 supports. 

I could get exact figures in case of NFSv3 (http://nfs.sourceforge.net).
It's 60KB when NFSv3 is used over UDP and implementation dependent in
case it is used over TCP. Any idea about NFSv4 statistics? 

Any pointers would be appreciated.


--
Thanks,
Nilesh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ