Re: Analyzing Linux Kernel

2010-06-19 Thread Joel Fernandes
How can we test the efficiency of the features provided by the OSes like Scheduling, Mem. Management, VM, network buffers (this i'm thinking to run with some traffic generator tool). I don't know about VxWorks but for the linux kernel take a look at ftrace. -Joel -- To unsubscribe from this

Re: A confusion in kernel module concepts and a problem case

2010-06-19 Thread Joel Fernandes
If a kernel code requires an external loadable module then will it get loaded automatically? Yes it will be, after you install a module, depmod is run which generates a file called modules.dep . modules.dep lists all dependencies for every module. These dependencies are then automatically

Re: About Linux Header files

2010-06-13 Thread Joel Fernandes
I'm sorry I misread your question. I guess the correct reason would be /build/include/linux has a lot of header files that userspace programs wouldn't need and are internal to the kernel. Thanks for the reply! but then what is the need for  /usr/include/linux/*.h files ? Hi Sid, There are

Re: About Linux Header files

2010-06-13 Thread Joel Fernandes
On Sun, Jun 13, 2010 at 2:17 PM, vikas chauhan presentisg...@gmail.com wrote: On 13 June 2010 14:31, vikas chauhan presentisg...@gmail.com wrote: I guess these headers ( in /usr/include/linux ) are sanitized kernel headers, needed for compiling user space applications. Do not top post

Re: About Linux Header files

2010-06-11 Thread Joel Fernandes
I see in my system (Ubuntu Hardy) that linux header files are at two places 1. si...@siddu-desktop:/usr/include$ find /lib/modules/2.6.24-16-generic/build/include/linux/ | wc -l 850 These headers are for compiling kernel code 2. si...@siddu-desktop:/usr/include$ find /usr/include/linux/ |

Re: About Linux Header files

2010-06-11 Thread Joel Fernandes
On Fri, Jun 11, 2010 at 7:41 PM, Joel Fernandes agnel.j...@gmail.com wrote: I see in my system (Ubuntu Hardy) that linux header files are at two places 1. si...@siddu-desktop:/usr/include$ find /lib/modules/2.6.24-16-generic/build/include/linux/ | wc -l 850 These headers are for compiling

Re: Why SAVE_ALL (for x86) macro in 2.6 loads __USER_DS to %ds

2010-06-08 Thread Joel Fernandes
I was looking at the SAVE_ALL code for kernel 2.6. I am confused why SAVE_ALL restores __USER_DS to ds and es ? #define SAVE_ALL \ cld; \ pushl %fs; \ pushl %es; \ pushl %ds; \ pushl %eax; \ pushl %ebp; \ pushl %edi; \ pushl

Re: Why SAVE_ALL (for x86) macro in 2.6 loads __USER_DS to %ds

2010-06-08 Thread Joel Fernandes
snip since Linux doesn't use segmentation , all the segment descriptor values are the same. So I think it doesn't matter what selector value you load in DS, ES etc. Though I don't know the real reason for why __USER_DS  is used instead of __KERNEL_DS Although, linux doesn't use

Re: Access thread stack from another thread

2010-06-07 Thread Joel Fernandes
On Mon, Jun 07, 2010 at 05:28:51PM +1200, Simon Kitching wrote: On Sun, 2010-06-06 at 13:49 +0530, Joel Fernandes wrote: On Sun, Jun 6, 2010 at 3:06 AM, Vimal j.vi...@gmail.com wrote: Hi Joel, now i have a question, even if they share the same vm address space - they definitely

Re: Access thread stack from another thread

2010-06-06 Thread Joel Fernandes
On Sun, Jun 6, 2010 at 3:06 AM, Vimal j.vi...@gmail.com wrote: Hi Joel, now i have a question, even if they share the same vm address space - they definitely can't share the userspace stack, i'm sure the kernel would have to reset it up in the same address space of the group of threads but

Re: would people be willing to spend a few dollars for beginner docs?

2010-06-05 Thread Joel Fernandes
On Sat, Jun 5, 2010 at 3:54 PM, Joel Fernandes agnel.j...@gmail.com wrote: Hi Robert, If you are sure about constantly adding new material etc, then I think a good idea would be to turn it into a subscription based service at $3 / month or something (too less?), something like LWN. I know I

Re: would people be willing to spend a few dollars for beginner docs?

2010-06-05 Thread Joel Fernandes
 sorry, but that's just not going to happen.  ever.  if the general impression here is that, for a donation of five bucks, you expect to get unfettered access to my personal attention, then we have massively different views of how the world works. Well, 5 bucks was just an example. You can

Re: Access thread stack from another thread

2010-06-05 Thread Joel Fernandes
On Sat, Jun 5, 2010 at 3:20 PM, Joel Fernandes agnel.j...@gmail.com wrote: On Sat, Jun 5, 2010 at 11:14 AM, Vimal j.vi...@gmail.com wrote: On 4 June 2010 17:16, Group mailforgr...@gmail.com wrote: Hi, Is it possible to access threads stack (not shared) from another thread? I have seen an API

Re: how does a filesystem submit a block IO request

2010-05-31 Thread Joel Fernandes
I'm learning block devices in Linux. It seems submit_bio can be used by file systems to submit block IO requests. But after I search for it in the linux kernel, I didn't see file systems like ext2 and ext3 use it. So how does a file system usually submit a request? I didn't find a wrapper of

Re: building 32 bit user mode linux in 64 bit environment

2010-05-24 Thread Joel Fernandes
Hi Michi, On Mon, May 24, 2010 at 10:29 PM, Michael Blizek mic...@michaelblizek.twilightparadox.com wrote: Hi! On 22:53 Mon 24 May     , Mulyadi Santosa wrote: On Mon, May 24, 2010 at 18:03, Michael Blizek mic...@michaelblizek.twilightparadox.com wrote: Hi! I have a system with 32 bit

Re: Getting driver module name from device node?

2010-05-18 Thread Joel Fernandes
Hi Mayank, Depending on the device, you can use sysfs (/sys) for this. Your email address says utexas, are you currently studying at a uni in texas? I'm joining CS this fall at UTDallas =) cheers, Joel On Wed, May 19, 2010 at 3:44 AM, Mayank Kaushik mayank.ute...@gmail.com wrote: Hi

Fwd: System memory increased while process is running is not released back upon process exit

2010-05-04 Thread Joel Fernandes
Just forwarding to the list -- Forwarded message -- From: Joel Fernandes agnel.j...@gmail.com Date: Tue, May 4, 2010 at 12:40 PM Subject: Re: System memory increased while process is running is not released back upon process exit To: ravikumar ravikumar.valla...@gmail.com Hi

Re: Dynamic Kernel Module Section Addresses

2010-04-28 Thread Joel Fernandes
Hey Venkatram, On Wed, Apr 28, 2010 at 11:33 AM, Venkatram Tummala venkatram...@gmail.comwrote: to find these addresses by p modules, the module has to be already loaded.right? So, the initialization function of the module must have been already executedright? So, the question is how

Re: how to call system call from kernelspace

2010-04-27 Thread Joel Fernandes
On Tue, Apr 27, 2010 at 7:55 AM, rahul patil rahul.deshmukhpa...@gmail.comwrote: Though it is bad idea to call a system call from kernel space is it possible any how to call a system call from kernel space? Generally a better idea to user kernel interfaces directly instead of sys calls.

Re: how to call system call from kernelspace

2010-04-27 Thread Joel Fernandes
On Wed, Apr 28, 2010 at 8:09 AM, Joel Fernandes agnel.j...@gmail.comwrote: On Tue, Apr 27, 2010 at 7:55 AM, rahul patil rahul.deshmukhpa...@gmail.com wrote: Though it is bad idea to call a system call from kernel space is it possible any how to call a system call from kernel space

Re: how to call system call from kernelspace

2010-04-27 Thread Joel Fernandes
On Wed, Apr 28, 2010 at 8:35 AM, rahul patil rahul.deshmukhpa...@gmail.com wrote: i want to call open,write system calls from kernel space. [oops, didn't hit reply-to-all at first, sorry rahul!] Not sure about open, but for read/write system calls, provided you already have file opened and

Re: can you turn off compile-time optimization entirely?

2010-04-18 Thread Joel Fernandes
Hi Robert, for debugging purposes, is it even physically possible to compile the kernel with no optimization whatever? Why wouldn't it be? Thanks, -Joel

Re: can you turn off compile-time optimization entirely?

2010-04-18 Thread Joel Fernandes
On Mon, Apr 19, 2010 at 5:43 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: Hi Robert On Mon, Apr 19, 2010 at 02:48, Robert P. J. Day rpj...@crashcourse.ca wrote: for debugging purposes, is it even physically possible to compile the kernel with no optimization whatever? IMO,

BH_Boundary flag

2010-04-08 Thread Joel Fernandes
Could anyone explain the significance of the BH_Boundary flag in a buffer head. and when you should this flag be set or cleared? What other effects does setting or clearing this flag have? Thanks, Joel -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to

Re: BH_Boundary flag

2010-04-08 Thread Joel Fernandes
On Thu, Apr 8, 2010 at 11:34 AM, Joel Fernandes agnel.j...@gmail.com wrote: Could anyone explain the significance of the BH_Boundary flag in a buffer head. and when you should this flag be set or cleared? What other effects does setting or clearing this flag have? Set if the block

Re: doubt regarding mmap/mmap2 system call and implementation

2010-04-08 Thread Joel Fernandes
I wish we could use mmap in kernel space but I think its hard to implement this, all kernel memory is directly and permanently mapped and not swappable. You can vmalloc in kernel but you cannot mmap.. Sorry I went wrong there, what I meant was you cannot have a page fault trigger on kernel

Re: why choose 896MB to the start point of ZONE_HIGHMEM

2010-04-08 Thread Joel Fernandes
Hi Venkatram, thanks for your wonderful explanation, I delayed asking further questions till I read every ones posts, its much clearer now. :) To make things clear, 896 MB is not a hardware limitation. The 3GB:1GB split can be configured during the kernel build but the split cannot be changed

Re: why choose 896MB to the start point of ZONE_HIGHMEM

2010-04-06 Thread Joel Fernandes
Hi Hayfeng, On Tue, Apr 6, 2010 at 8:07 PM, hayfeng Lee teklife.ker...@gmail.com wrote: hello,every one. I have a question: Why does linux choose 896MB to do a start point of ZONE_HIGHMEM and the end point of ZONE_NORMAL. Just for experience? What is the advantages? This is not an advantage

Re: why choose 896MB to the start point of ZONE_HIGHMEM

2010-04-06 Thread Joel Fernandes
Hi Peter, On Wed, Apr 7, 2010 at 1:14 AM, H. Peter Anvin h...@zytor.com wrote: On 04/06/2010 12:20 PM, Frank Hu wrote: The ELF ABI specifies that user space has 3 GB available to it.  That leaves 1 GB for the kernel.  The kernel, by default, uses 128 MB for I/O mapping, vmalloc, and kmap

Re: Schedule() call in driver context.

2010-02-23 Thread Joel Fernandes
Hi Greg, Instead there is an intermediary context that I don't think you've taken into account. I believe timers are also invoked in this intermediary context.  ie. When a timer invokes a function you can't trust the process / task structures to relate to your original userspace app. I

Re: Schedule() call in driver context.

2010-02-23 Thread Joel Fernandes
Like for example when a write() happens, this doesn't have to necessarily go all the way till the disk immediately, instead its Ofcourse, unless the file is opened in O_DIRECT mode -Joel -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org

Re: Schedule() call in driver context.

2010-02-23 Thread Joel Fernandes
My understanding is the kernel uses interrupts to count the time and to trigger timer routines - but these routine are executed in the context they were registered. A timer created by a process executes in process context. A driver registered timer executes in kernel context (not interrupt).

Re: Schedule() call in driver context.

2010-02-23 Thread Joel Fernandes
Hi Greg, I'm relatively new to this stuff but I think I will make some bold statements: With linux today, is there a specific process context (ie. kernel thread) associated with executing functions triggered by timers firing off? No, a timer being fired wouldn't be associated with any single

Re: How to build static module

2010-02-22 Thread Joel Fernandes
As a part of 2.6 kernel compilation I want to include  my module to make static module. What do you mean by static module? Do you mean you want to make it a part of the kernel image? All modules are supposed to be relocatable so that they can be loaded in any part of kernel memory on insmod.

Re: Schedule() call in driver context.

2010-02-22 Thread Joel Fernandes
Hi Stephan, I'm no expert this is what I think: 1. What event awakes the process? Has the driver any way to control it? The kernel code executing on behalf of the process is usually waiting for some resource to become available, we sleep because we can't return from the middle and have to wait

Re: Schedule() call in driver context.

2010-02-22 Thread Joel Fernandes
, Joel Fernandes agnel.j...@gmail.com wrote: In fact the kernel is not interrupt-able in linux as I recall.  Thus a misbehaving driver that enters an infinite loop will hang the whole machine. ... Another way to ask your question is Why isn't the linux kernel itself timesliced? AFAIK, What you're

Re: Schedule() call in driver context.

2010-02-22 Thread Joel Fernandes
My understanding is in a driver: - use schedule() when waiting for kernel services. - use timers when waiting for the device. Hi Stephan, You got it all right except the fact that you cannot use a timer because timers execute in interrupt context, not process context. When your Process

Re: how to know what files build in one module?

2010-02-18 Thread Joel Fernandes
Makefile determine which file will be compiled. Makefile also determines which objects are linked together to produce your final relocatable kernel module. But how does the kernle finally know what is the name of module and The module name comes IMO from the final object-name.ko. how many

Re: how to know what files build in one module?

2010-02-18 Thread Joel Fernandes
But how does the kernle finally know what is the name of module and The module name comes IMO from the final object-name.ko. More precisely the module name is specified in the Makefile. For example for the ext2 kernel module, the ext2-y and ext2.o entries in the Makefile tells the kernel build

scatter-gather I/O

2010-02-17 Thread Joel Fernandes
Its so quite in hear (maybe because of Ash wednesday?) so I thought I'd break the silence with a few questions. :) I've been reading about the block layer and the scatter gather mechanism which uses an array of bio_vecs in a single bio. My questions are: 1. Can a particular bio vector (segment)

Re: Kernel logging

2010-01-30 Thread Joel Fernandes
Hi Neependra, My question is, Is there a better way (better than logging) of tracking operations internal to the kernel continuously over long period of time in a way that doesn't affect latency (very drastically)? You can look at SystemTap which has very less overhead.

Re: Kernel logging

2010-01-30 Thread Joel Fernandes
On Sat, Jan 30, 2010 at 3:59 AM, Joel Fernandes agnel.j...@gmail.com wrote: My question is, Is there a better way (better than logging) of tracking operations internal to the kernel continuously over long period of time in a way that doesn't affect latency (very drastically)? Maybe you also

Kernel logging

2010-01-29 Thread Joel Fernandes
I've made some changes to ext2 filesystem, and its approaching stability but not yet there. The problem is that I see corruptions after the FS has been mounted and running for days, but not immediately. The other problem is these corruptions don't show up on our test environment, and only on

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-27 Thread Joel Fernandes
, 2010 at 12:20 PM, Joel Fernandes agnel.j...@gmail.com wrote: Incase it helps some one else, I upgraded from gdb-6.8 to gdb 7.0 and the line numbers show up fine. hmff, bug in DWARF reading -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-27 Thread Joel Fernandes
PM, Joel Fernandes agnel.j...@gmail.com wrote: I think the problems were in the way the line information was structured in the kernel module ELF. The line information of all the objects were clubbed together when compiling for x86_64 but the starting numbers were not taken into account

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-27 Thread Joel Fernandes
Nice observation :) So, perhaps might question, what the best way to avoid such problem. always use latest gdb? I thought things like this is formally standardized I don't know why ld resets the addresses (or rather doesn't make the addresses continugous in .debug_line) when linking

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-27 Thread Joel Fernandes
perhaps we can peek into ksplice on how to deal with such thing? i haven't used ksplice by myself, but I guess it will use  DWARF info somehow, right? Sure, there's also elfutils (readelf is a part of that) which contains code that parses dwarf line info.. but line info is fairly non-trivial,

Re: accessing per-cpu variables from gdb

2010-01-26 Thread Joel Fernandes
of the per-cpu variable current_task work in the above code? Thanks, -Joel On Tue, Jan 26, 2010 at 12:43 PM, Robin Randhawa robin.randh...@gmail.com wrote: Hi Joel. On Tue, Jan 26, 2010 at 03:23:03AM +0530, Joel Fernandes wrote: I am having some trouble accessing 'current' to get the currently

Re: automatic driver loading functionality in Linux

2010-01-26 Thread Joel Fernandes
modprobe is smart and knows what modules support what devices based on the cache it creates when you run 'depmod' when a new kernel is installed. That information is found in the drivers themselves. See the modprobe code for details if you wish to know the exact mechanisms involved, it's

Re: automatic driver loading functionality in Linux

2010-01-26 Thread Joel Fernandes
Hi Greg. What you want to look at is the modules.alias file.  That is what makes things so simple, it creates a mapping from a device/product id to the actual module. I get the idea now, thanks. So when a device is connected, a modalias is generated with the vendor/productid and then modprobe

accessing per-cpu variables from gdb

2010-01-25 Thread Joel Fernandes
I am having some trouble accessing 'current' to get the currently executing task in kgdb (x86_64). As current is a macro, I can't expand it in kgdb, so instead I'm trying to access the variable per_cpu__current_task inorder to get the task_struct for the currently executing task. But the memory

Re: Is there any reference or documents about how Linux supports dynamic library?

2010-01-24 Thread Joel Fernandes
On Sun, Jan 24, 2010 at 12:57 PM, ZelluX zel...@gmail.com wrote: So actually dynamic linking has nothing to do with kernel, or there's no special system calls or other mechanisms provided by kernel to support dynamic linking, is it right? Why would you need special support in the kernel? As

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-23 Thread Joel Fernandes
Incase it helps some one else, I upgraded from gdb-6.8 to gdb 7.0 and the line numbers show up fine. Thanks, -Joel On Wed, Jan 20, 2010 at 2:08 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi... On Tue, Jan 19, 2010 at 10:14 PM, Joel Fernandes agnel.j...@gmail.com wrote

automatic driver loading functionality in Linux

2010-01-23 Thread Joel Fernandes
I have a doubt with the modalias file in sysfs and its role in modprobe's ability to automatically load modules. I understand that this file is generated by the kernel based on the list of devices that the driver tells the kernel it supports? and it is with this list that modprobe figures which

Re: Is there any reference or documents about how Linux supports dynamic library?

2010-01-23 Thread Joel Fernandes
I wrote a bit about dynamic linking and ELF a while back too, Maybe you can find something useful: http://www.hackerbliss.org/2009/11/notes-on-elf-file-format.html -Joel On Sat, Jan 23, 2010 at 10:38 AM, ZelluX zel...@gmail.com wrote: Really useful book and article, many thanks for your replies

Re: automatic driver loading functionality in Linux

2010-01-23 Thread Joel Fernandes
then this function * becomes a no-operation. */ int __request_module(bool wait, const char *fmt, ...) { On Sat, Jan 23, 2010 at 7:04 PM, Joel Fernandes agnel.j...@gmail.com wrote: I have a doubt with the modalias file in sysfs and its role in modprobe's ability to automatically load modules

gdb doesn't load line number information from object (kgdb target)

2010-01-19 Thread Joel Fernandes
I am trying to debug a kernel module that has been loaded after the start of a kgdb session. Once I load the module, I do: (gdb) add-symbol-file ~/ext2.ko 0xa01b1000 This works fine, and gdb knows the addresses of the symbols in the kernel module, to verify this: At the KGDB target: #

Re: gdb doesn't load line number information from object (kgdb target)

2010-01-19 Thread Joel Fernandes
Hi Mulyadi, thanks for your message as always :) Just some thoughts: But why doesn't gdb load it when I do an 'add-symbol-file' ? What am I doing wrong here? I guess, kgdb stub in the target's end doesn't implement complete DWARF readingspecificly address to line numbers translation.

Re: browsing the kernel source with ctags?

2010-01-19 Thread Joel Fernandes
On Wed, Jan 20, 2010 at 8:43 AM, Tony Miller mcfiredr...@gmail.com wrote: Is it possible to browse the kernel source with ctags? I used exuberant-ctags to generate a tags file for my kernel sources, but it doesn't really work as you expect. If you try to jump to the definition of a function it

Re: Process, Lightweight Process and Thread

2010-01-17 Thread Joel Fernandes
Yes. Do a quick grep for functions calling do_fork in arch/x86/kernel/* -Joel On Sat, Jan 16, 2010 at 10:40 PM, Daniel (Youngwhan) Song breadn...@gmail.com wrote: Thank you, Mulyadi, now, I could understand about NPTL implementation and lightweight process concept. One thing I want to check

CLONE_KERNEL flag - creating a new kernel thread

2010-01-17 Thread Joel Fernandes
The CLONE_KERNEL flag is defined as: #define CLONE_KERNEL(CLONE_FS | CLONE_FILES | CLONE_SIGHAND) So as I understand it, when the CLONE_KERNEL flag is passed at the time of creating a kernel thread, the copy_process function copies the file descriptors and signal handlers from the currently

preemption disable in spin_lock

2010-01-17 Thread Joel Fernandes
Why is preemption disabled before a lock is acquired in _spin_lock function? As the critical region of code which is to be protected by the spin lock executes only after the lock is acquired, why is disabling of preemption required before the lock is acquired? Wouldn't it better if the kernel

Re: preemption disable in spin_lock

2010-01-17 Thread Joel Fernandes
Thanks for your message. Also adding to that, I think it doesn't matter because spinlocks are supposed to held for a short period. -Joel On Sun, Jan 17, 2010 at 10:13 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi Joel... On Sun, Jan 17, 2010 at 9:34 PM, Joel Fernandes agnel.j

copy-on-write overhead

2010-01-10 Thread Joel Fernandes
Hi, The book Linux Kernel Development mentions a certain overhead which is reduced in linux because the child is made to run first after it is forked (instead of the parent) and if the child executes the exec system call. Quoting Pg 32 (2nd edition): In do_fork() the child is woken up and run.

Re: copy-on-write overhead

2010-01-10 Thread Joel Fernandes
How does running exec() in child more efficient than having copy-on-write trigger in the parent? In order to create a new process (fork), you will copy the whole of relevant info of address space from the parent. Now if the address space is shared and parent runs first for any change it

Re: copy-on-write overhead

2010-01-10 Thread Joel Fernandes
this copying so it can't be avoided in any case. The book says copy-on-write itself has more overhead that is avoided with exec() in the child, but I'm trying to figure how. -Joel On Mon, Jan 11, 2010 at 12:18 AM, Manish Katiyar mkati...@gmail.com wrote: On Mon, Jan 11, 2010 at 12:02 AM, Joel

Re: Suggestions for implementing a persistent binary tree

2010-01-10 Thread Joel Fernandes
wrote: On Wed, Jan 6, 2010 at 4:20 AM, Joel Fernandes agnel.j...@gmail.com wrote: There is a certain hashtable that I am currently implementing in the kernel using file handling for sake of persistence. It is actually a file-based binary tree (nodes are referred to by file offsets instead

Re: copy-on-write overhead

2010-01-10 Thread Joel Fernandes
Hi Manish, Mulyadi, Yes I see it now, Thanks for your help. -Joel On Mon, Jan 11, 2010 at 6:22 AM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On 1/11/10, Joel Fernandes agnel.j...@gmail.com wrote: Oh I'm sorry, if you were talking about copying of the address space information that can

Re: kernel API and other update changes.

2010-01-08 Thread Joel Fernandes
As there are many changes in Latest kernel with respect to LDD3 documentation.so where can i get documentation of latest API and which API and flags deprecated with respect to LDD3. The kernel interfaces are themselves sort of well documented in the sources. I usually search LKML

Re: Fwd: Embedded Linux development

2010-01-07 Thread Joel Fernandes
if you just want a dev board to get started, why not go with a beagleboard? http://beagleboard.org/ Most of these boards have export restrictions for 3rd world countries and getting a clearance is beyond individual or group thing needs more force :) If you're talking about India,

Suggestions for implementing a persistent binary tree

2010-01-06 Thread Joel Fernandes
There is a certain hashtable that I am currently implementing in the kernel using file handling for sake of persistence. It is actually a file-based binary tree (nodes are referred to by file offsets instead of memory addresses). The problem is that the tree can get unbalanced quite quickly and

Re: unable to mount rootfs (was :Re: kernel compilation help)

2009-12-30 Thread Joel Fernandes
compiled with the kernel? Thanks, -Joel On 12/30/09, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi Joel... I hope you don't mind that I rewrite the subject to avoid confusion... On Wed, Dec 30, 2009 at 11:12 AM, Joel Fernandes agnel.j...@gmail.com wrote: Hey Mulyadi, It acts as initial

Re: kernel compilation help

2009-12-30 Thread Joel Fernandes
Hey Mulyadi, It acts as initial root filesystem containing modules needed to proceed into complete successful booting e.g loading ext3 kernel module to access real filesystem, loading LVM modules in case your root filesystem stays inside LVM etc etc My root file system is ext3 and I have it

Re: What is difference between initrd and regular RAM disk?

2009-12-15 Thread Joel Fernandes
inird: http://www.ibm.com/developerworks/linux/library/l-initrd.html http://en.wikipedia.org/wiki/Initrd ramdisk: http://www.vanemery.com/Linux/Ramdisk/ramdisk.html In recent times, ramdisk in the context of an initrd is really a misnomer and is more accurately an initramfs - cpio archive that

Re: Kernel mode stack per process?

2009-12-14 Thread Joel Fernandes
   Am I right in saying that there is kernel mode stack maintained per process? Yes. Also in the book Understanding the Linux Kernel in chapter 3: Processes there is a diagram of the stack and the thread_info structure. The addresses shown are 0x015fa000 etc. Shouldn't the addresses start

Re: 2 page kernel stacks in older kernels

2009-12-13 Thread Joel Fernandes
Hi Mulyadi, Thanks for your response. But, DMA doesn't happen to the stack so its ok if the (2-page)stack is not physically contiguous as long as it is virtually contiguous? I'm talking in terms of the processor architecture where all memory accesses are infact virtual when paging is turned on,

2 page kernel stacks in older kernels

2009-12-12 Thread Joel Fernandes
There was a requirement in older kernels that the stack (which was then 2 pages and is now 1 page in newer kernels) had to be physically adjacent. Why was there such a requirement? wouldn't it have sufficed for the kernel stack to be contiguous in virtual memory? Thanks, -Joel -- To unsubscribe

Re: 2 page kernel stacks in older kernels

2009-12-12 Thread Joel Fernandes
, 2009 at 5:48 PM, Joel Fernandes agnel.j...@gmail.com wrote: There was a requirement in older kernels that the stack (which was then 2 pages and is now 1 page in newer kernels) had to be physically adjacent. Why was there such a requirement? wouldn't it have sufficed for the kernel stack

Re: keyboard

2009-12-11 Thread Joel Fernandes
Hi Peter, There is always something new to learn from your posts. thanks :) Regards, Joel On Mon, Dec 7, 2009 at 8:44 AM, Peter Teoh htmldevelo...@gmail.com wrote: On Sun, Dec 6, 2009 at 5:57 AM, Herlin R. Matos Lastres hma...@grm.uci.cu wrote: Hi, I need manage the keyboard, for example

Re: page cache query

2009-12-11 Thread Joel Fernandes
My question is why the cache is growing even after O_SYNC flag? Even fsync does not help. But deleting file freeing the cache. Try O_DIRECT if you want to bypass the page cache. -Joel -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org

Re: Overwriting sys_call_table entries

2009-11-29 Thread Joel Fernandes
Actually, IMO, even on 2.4, loosely replacing certain or all sys_call_table entries are highly discouraged. The reason is similar...you don't know whether they are currently referenced or not, right? Since all other code expects it to be read-only anyway once its setup (if I'm right),

Re: x86 assembly - linking order query

2009-11-14 Thread Joel Fernandes
You have not used ret instruction in AsmFn2, I guess it will cause undefined behavior. I think it has nothing to do with how you compile the code. It works perfectly after adding ret instruction at the end of AsmFn2. Correct me if I am missing something here. Thanks. That was the problem,

Re: Allocate continuous memory and physical address.

2009-11-12 Thread Joel Fernandes
Yes that's right, AFAIK kmap allocates physically contiguous memory and vmalloc allocates virtual contiguous memory. Sorry, change kmap to kmalloc. Regards, -Joel -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to ecar...@nl.linux.org Please read the FAQ at

Re: Allocate continuous memory and physical address.

2009-11-12 Thread Joel Fernandes
Thanks for your replied. I surveyed in the internet and found the kerenl's kmalloc API also return a continuous memory address. Is it right? So there are two kernel APIs (__get_free_page, kmalloc) return a _continuous_ memory address (virtual address) and it can be convert to physical address

Re: Kernel Source code/Driver coding IDE ?? Suggest

2009-11-10 Thread Joel Fernandes
Try kscope, it is a source code browser (based on cscope) and an inline editor (based on kate). It can also generate call graphs and stuff. -Joel On Tue, Nov 10, 2009 at 11:38 AM, Pulkit Goel vipulkit.g...@gmail.comwrote: *Hi* Everyone, 1) I want to browse the linux *Kernel Source Code*

Re: a conceptual confusion -- bio--page --block -- buffer

2009-11-07 Thread Joel Fernandes
My questions: 1. Why wouldn't the kernel create a buffer page even for pages that contain physically adjacent blocks? Why are pages that contain physically adjacent blocks given special treatment? I'm sorry I meant- why are pages that don't contain physical adjacent blocks given special

Re: Virtual Memory Doubt

2009-11-02 Thread Joel Fernandes
Hi Mulyadi, I will just add a few more questions, don't mind me poking in a bit.. :) I think it's not the virtual address that is created, but the Virtual Memory Area. Then, addresses are assigned to this VMA. Whether the VMA contains page frame or not, that's another case. Do you mean VMA of

Re: Doubt regarding page traversal

2009-10-27 Thread Joel Fernandes
Please help me to figure out some basic concepts in MM. From the books, i learned that VMA to PA translation consists of traversing the full page directory, which consists of Global Directory, Middle Directory and Page Table. I have also read that, VMA to PA translation is done using a

Re: ext3 writing of data before metadata in ordered mode

2009-10-26 Thread Joel Fernandes
, Joel Fernandes wrote: In data=ordered mode the ext3_ordered_commit_write function marks the buffers as dirty, how then does the JBD ensure that the data is written before the metadata? Once the data buffers are marked as dirty, JBD doesn't have control anymore over when the data is written

Re: new member

2009-10-25 Thread Joel Fernandes
Hi Vikram, There are a lot of good books you can read: http://www.amazon.com/Linux-System-Kernel-Programming-Books/lm/2ZE3JEGU41LP7 Robert Love's Linux Kernel Development is brief and nice, David Bovet's Understanding the linux kernel dissects the internals of the kernel in pain staking detail.

ext3 writing of data before metadata in ordered mode

2009-10-25 Thread Joel Fernandes
In data=ordered mode the ext3_ordered_commit_write function marks the buffers as dirty, how then does the JBD ensure that the data is written before the metadata? Once the data buffers are marked as dirty, JBD doesn't have control anymore over when the data is written is actually written to disk

Re: Ontario Linux Fest this Saturday in Toronto.

2009-10-21 Thread Joel Fernandes
Hi Robert, Unfortunately I will not be able to attend it, are videos going to be made available later? Is there anyway we can catch it live? Good luck with the session. Thanks, Joel On Wed, Oct 21, 2009 at 9:05 AM, Robert P. J. Day rpj...@crashcourse.ca wrote:  http://onlinux.ca/ and this

Re: About the system call named sys_mount.

2009-10-20 Thread Joel Fernandes
Hi Rajat, So kernel virtual memory is always directly and permanently mapped and never has to fault? Is this for performance or is it because the kernel can't handle its own faults (kernel doesn't want to take responsibility for its own faults!). Also I would be grateful if you could describe in

Re: pdflush deprecated by per-bdi writeout

2009-10-19 Thread Joel Fernandes
Thanks for sharing! Peter, I think spindle is used just as another word for slow device which I guess could be any other type of slow storage medium like iSCSI or loop over NFS. In some degree, I agree with that. However, specificly to block device like hard disk, where things could made

Re: pdflush deprecated by per-bdi writeout

2009-10-19 Thread Joel Fernandes
IMO yes, but starved better :) Not sure if I write it correctly, but here is my understanding: say you have 4 pdflush threads, competing to write to a disk. All are busy, so you can say all are quite starved. But the writing process (even though it's using async style) doesn't know about it.

problem with kernel logging

2009-10-18 Thread Joel Fernandes
Hi List, I'm having a little problem with controlling logging levels. Here I've set console_loglevel to 1 as shown below: cat /proc/sys/kernel/printk 1 4 1 7 But /proc/kmsg still shows messages with lower priority levels such as KERN_INFO and KERN_DEBUG with 6 and 7 tagged to

Re: problem with kernel logging

2009-10-18 Thread Joel Fernandes
Ok seems I didn't read the docs carefully enough, seems console_loglevel controls the level of logging to the console and not to what klogd retrieves from the kernel log buffers. Correct? Thanks, -Joel On Sun, Oct 18, 2009 at 12:45 AM, Joel Fernandes agnel.j...@gmail.com wrote: Hi List, I'm

Re: problem with kernel logging

2009-10-18 Thread Joel Fernandes
On Sun, Oct 18, 2009 at 1:08 AM, Joel Fernandes agnel.j...@gmail.com wrote: Ok seems I didn't read the docs carefully enough, seems console_loglevel controls the level of logging to the console and not to what klogd retrieves from the kernel log buffers. Correct? I've managed to have syslog

Re: pdflush deprecated by per-bdi writeout

2009-10-18 Thread Joel Fernandes
On Sun, Oct 18, 2009 at 9:17 AM, Peter Teoh htmldevelo...@gmail.com wrote: On 10/18/09, Rik van Riel r...@nl.linux.org wrote: Peter Teoh wrote: now the pdflush is deprecated by per-bdi writeout. Can I know conceptually, in a few sentences, what are the key features that enable per-bdi

Re: Filesystem / Partition type support in kernel

2009-10-16 Thread Joel Fernandes
to get along with it. Joel Fernandes schrieb: From fs/partitions/Makefile, it seems that atari partitions can be compiled as a kernel module. You also wouldn't need to recompile the kernel just for this. Why do you think that? The Makefile says: obj-$(CONFIG_ATARI_PARTITION) += atari.o

  1   2   >