A query on page cache and writepage

2010-12-17 Thread Prasad Joshi
Hello All, I am working on a file system, that uses page cache only if a file is memory mapped. This is how the code is designed write() { write the data onto the disk if (file not memory mapped) return; /* file is memory mapped */ while (till all data is not syced

Re: QEMU Uncompressing Linux.... stalls

2010-12-13 Thread Prasad Joshi
On Mon, Dec 13, 2010 at 7:44 AM, onlyfever onlyfe...@gmail.com wrote: 2010/12/9, Prasad Joshi prasadjoshi...@gmail.com: Thanks a lot for your reply. On Thu, Dec 9, 2010 at 1:06 AM, Alexandre Courbot gnu...@gmail.com wrote: Hi, There is probably a kernel misconfiguration somewhere. Could you

Re: QEMU Uncompressing Linux.... stalls

2010-12-13 Thread Prasad Joshi
On Mon, Dec 13, 2010 at 7:53 AM, Prasad Joshi prasadjoshi...@gmail.com wrote: On Mon, Dec 13, 2010 at 7:44 AM, onlyfever onlyfe...@gmail.com wrote: 2010/12/9, Prasad Joshi prasadjoshi...@gmail.com: Thanks a lot for your reply. On Thu, Dec 9, 2010 at 1:06 AM, Alexandre Courbot gnu...@gmail.com

Re: QEMU Uncompressing Linux.... stalls

2010-12-10 Thread Prasad Joshi
On Thu, Dec 9, 2010 at 7:41 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: On Fri, Dec 10, 2010 at 02:06, Prasad Joshi prasadjoshi...@gmail.com wrote: After trying most of the block devices to boot the kernel under QEMU, I added few printks around the code that does the mounting

Re: QEMU Uncompressing Linux.... stalls

2010-12-09 Thread Prasad Joshi
Thanks a lot for your reply. On Thu, Dec 9, 2010 at 1:06 AM, Alexandre Courbot gnu...@gmail.com wrote: Hi, There is probably a kernel misconfiguration somewhere. Could you post your .config, and maybe even your vmlinux somewhere where we can download it? Yes it was misconfiguration. I had

Re: QEMU Uncompressing Linux.... stalls

2010-12-09 Thread Prasad Joshi
On Thu, Dec 9, 2010 at 12:34 PM, Alexandre Courbot gnu...@gmail.com wrote: Also, you can use QEmu's GDB server in order to see exactly where your kernel stops executing. This should be much more comfortable than putting printfs into QEmu's code. If you don't know how it works, look here for

Re: QEMU Uncompressing Linux.... stalls

2010-12-09 Thread Prasad Joshi
On Thu, Dec 9, 2010 at 1:54 PM, Alexandre Courbot gnu...@gmail.com wrote: $ qemu-system-arm -M realview-pbx-a9 -kernel clfskernel-2.6.36 -hda initrd-rootfs.img -append console=ttyAMA0 root=/dev/hda1 ro mem=256M -m 1024 -nographic ... VFS: Cannot open root device hda1 or unknown-block(0,0)

Re: QEMU Uncompressing Linux.... stalls

2010-12-09 Thread Prasad Joshi
and Regards, Prasad On Thu, Dec 9, 2010 at 2:27 PM, Prasad Joshi prasadjoshi...@gmail.com wrote: On Thu, Dec 9, 2010 at 1:54 PM, Alexandre Courbot gnu...@gmail.com wrote: $ qemu-system-arm -M realview-pbx-a9 -kernel clfskernel-2.6.36 -hda initrd-rootfs.img -append console=ttyAMA0 root=/dev/hda1

QEMU Uncompressing Linux.... stalls

2010-12-08 Thread Prasad Joshi
Hello All, I built an arm-linux kernel and trying to boot it using QEMU. But it stalls after showing 'Uncompressing Linux...' $ qemu-system-arm -M realview-pbx-a9 -kernel clfskernel-2.6.36 -initrd rootfs.gz -append console=ttyAMA0 root=/dev/sda1 rw ramdisk_size=32678 -m 256 -nographic

KVM MMU Invalidation

2010-10-27 Thread Prasad Joshi
Hello All, I was looking at the TODO list on KVM wiki. Here are two TODO I could not understand at all. 1. O(1) write protection by protecting the PML4Es, then on demand PDPTEs, PDEs, and PTEs 2. O(1) mmu invalidation using a generation number what is MMU invalidation? Why is it needed? Could

Re: BUG: sleeping function called from invalid context at mm/slab.c

2010-10-14 Thread Prasad Joshi
Could you please describe when did this happen? Also paste the output of the command uname -a On Thu, Oct 14, 2010 at 12:24 PM, Amit Nagal helloin.a...@gmail.com wrote: Hi , i am getting this kernel log . BUG: sleeping function called from invalid context at mm/slab.c:3055 in_atomic(): 1,

Re: Understanding NULL pointer dereference

2010-06-18 Thread Prasad Joshi
On Fri, Jun 18, 2010 at 1:19 PM, Manish Katiyar mkati...@gmail.com wrote: On Fri, Jun 18, 2010 at 10:11 AM, Prasad Joshi prasadjoshi...@gmail.com 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

Supporting async IO in block device driver.

2010-05-20 Thread Prasad Joshi
Hi All, I am working on a block device driver, like standard loop device, I am adding every new IO request in a bio list. The code looks something like this make_request() { bio_list_add(); wakeup_thread(); } thread() { bio = get new bio()

Re: Mounting block device fails.

2009-10-09 Thread Prasad Joshi
of mount manpage does not mention blocksize option. Is there anyway I can create ext2 filesystem with blocksize 8192? Thanks and Regards, Prasad On Thu, Oct 8, 2009 at 6:41 PM, Manish Katiyar mkati...@gmail.com wrote: On Thu, Oct 8, 2009 at 12:38 PM, Prasad Joshi prasadjoshi...@gmail.com wrote: Hi

Re: Mounting block device fails.

2009-10-09 Thread Prasad Joshi
On Fri, Oct 9, 2009 at 11:34 AM, Manish Katiyar mkati...@gmail.com wrote: On Fri, Oct 9, 2009 at 11:28 AM, Manish Katiyar mkati...@gmail.com wrote: On Fri, Oct 9, 2009 at 11:16 AM, Prasad Joshi prasadjoshi...@gmail.com wrote: Thanks Manish, The issue was with filesystem creation

Queued Spin Lock.

2009-08-11 Thread Prasad Joshi
Hi All, I am working on Porting of a windows device driver to Linux. Windows has a notion of Queued Spinlock. I could not understand how it is different than normal spinlock, the document says it is faster than a normal spinlock. If any one is having more information on Queued Spinlock, please

Re: Perplexed with a compilation problem.

2009-08-07 Thread Prasad Joshi
On Thu, Aug 6, 2009 at 5:45 PM, Belisko Marek marek.beli...@gmail.comwrote: Hi, On Thu, Aug 6, 2009 at 1:04 PM, Prasad Joshiprasadjoshi...@gmail.com wrote: Hi All, I am porting a Windows device driver to Linux. I defined a macro for CONTANING_RECORD like #define

Perplexed with a compilation problem.

2009-08-06 Thread Prasad Joshi
Hi All, I am porting a Windows device driver to Linux. I defined a macro for CONTANING_RECORD like #define CONTAINING_RECORD(ptr, type, member) list_entry((ptr), (type), (member)) When i compiled my module, i got following errors *$ make 21 | grep 1132* alloc.c:1132: error: expected

Using submit_bh from IOCTL

2009-07-21 Thread Prasad Joshi
Hi All, I am working on a block device (something similar to the loop device). The block device is associated with a file. So every write or read on block device is intern scheduled to the backing file. Very much similar to the loop device. But, I also need to submit a page full of IOs from the

Re: Using submit_bh from IOCTL

2009-07-21 Thread Prasad Joshi
Hi Sandeep, Thanks a lot for your reply On Tue, Jul 21, 2009 at 4:12 PM, SandeepKsinhasandeepksi...@gmail.com wrote: Hi Prasad, On Tue, Jul 21, 2009 at 12:14 PM, Prasad Joshi prasadjoshi...@gmail.com wrote: Hi All, I am working on a block device (something similar to the loop device

confused with child page table handling in fork().

2008-10-24 Thread Prasad Joshi
Hi All, code flow of the fork() till dup_mm() do_fork () copy_process copy_mm dup_mm allocates memory to hold struct mm_struct memcpy(mm, current-oldmm, sizeof(*mm));

Re: confused with child page table handling in fork().

2008-10-24 Thread Prasad Joshi
On Fri, Oct 24, 2008 at 2:44 PM, Rene Herman [EMAIL PROTECTED]wrote: On 24-10-08 09:25, Prasad Joshi wrote: My understanding is when a process does a fork 1. a new page table will be allocated to the process 2. it will be exactly same copy of the parent process 3. both the page tables

Need FUSE API documentation

2008-10-23 Thread Prasad Joshi
Hi, I need a FUSE API documentation, I tried googling it but did not found one. If anyone is knows the location please pass it to me. Thanks and Regards, Prasad -- To unsubscribe from this list: send an email with unsubscribe kernelnewbies to [EMAIL PROTECTED] Please read the FAQ at

Re: be confused with Linux Device Model

2008-09-07 Thread Prasad Joshi
Try Linux Kernel Development, By Robert Love. On Sat, Sep 6, 2008 at 7:12 PM, Steven Zhou [EMAIL PROTECTED] wrote: Hi guys, I'm a newbie about Linux driver developing, and now I'm studying the Linux driver model. I have refered the book Understanding the Linux Kernel, but... I'm still

creating a character device using device_create is failing.

2008-08-27 Thread Prasad Joshi
Hi All, I want register the character device with sysfs and want a device file to be created. The function device_create() does the same, but it seems to be failing in my case. Here is the part of the code #define MYMAJOR 200 struct mydevice { struct device *parent; struct device

Re: Passing kernel space data buffer where userspace is expected.

2008-08-20 Thread Prasad Joshi
On Wed, Aug 20, 2008 at 11:05 AM, Sachin Gaikwad [EMAIL PROTECTED]wrote: Hi Prasad, On Wed, Aug 6, 2008 at 6:50 PM, Prasad Joshi [EMAIL PROTECTED] wrote: Hi All, I want to encrypt the data before it is written to the disk and decrypt is after it is being read from the disk. so copied

Re: Passing kernel space data buffer where userspace is expected.

2008-08-20 Thread Prasad Joshi
On Wed, Aug 20, 2008 at 11:05 AM, Sachin Gaikwad [EMAIL PROTECTED]wrote: Hi Prasad, On Wed, Aug 6, 2008 at 6:50 PM, Prasad Joshi [EMAIL PROTECTED] wrote: Hi All, I want to encrypt the data before it is written to the disk and decrypt is after it is being read from the disk. so copied

UML process is not running.

2008-08-19 Thread Prasad Joshi
Hi All, I am getting this error after starting the UML. [EMAIL PROTECTED]:~/linuxsrc/linux-2.6.26-rc5_uml$ ./linux mem=128 ubda=/mnt/ Locating the top of the address space ... Address 0x0 no good? This is the first time I am using UML Steps I did in the linux source directory 1. make mrproper

Re: How to register a sysctl table on linux-2.6.25?

2008-08-17 Thread Prasad Joshi
Hi Jovi, /* this is the data variable where we receive the data written by sysctl interface */ static char event_handler[256]; static struct ctl_table_header *handler_header_table; static struct ctl_table my_event_table[] = { { .ctl_name = KERN_EVENT_HANDLER,/* this

Need some documentation on call_usermodehelper.

2008-08-15 Thread Prasad Joshi
Hi All, I need some documentation on calling user mode program from the kernel space. While searching I came to know the function call_usermodehelper(). But I am not finding good documentation on how to use it. Can someone please give me some pointers? Thanks and Regards, Prasad.

Passing kernel space data buffer where userspace is expected.

2008-08-06 Thread Prasad Joshi
Hi All, I want to encrypt the data before it is written to the disk and decrypt is after it is being read from the disk. so copied the ext2 source code in my directory. Then modified the ext2 file_operations structure to invoke my read and write functions instead of do_sync_read/write const

Re: Getting the list of the file systems which are mounted.

2008-08-05 Thread Prasad Joshi
do you need to obtain a list of available filesystems from a driver? Shouldn't you handle this in an application instead? Best Regards, -- Mark On Aug 3, 2008, at 10:04 PM, Rene Herman wrote: On 04-08-08 03:59, Prasad Joshi wrote: I am using 2.6.26 kernel. Can you please explain, why

Re: Getting the list of the file systems which are mounted.

2008-08-05 Thread Prasad Joshi
On Tue, Aug 5, 2008 at 11:41 AM, Rene Herman [EMAIL PROTECTED]wrote: On 05-08-08 07:51, Prasad Joshi wrote: Thanks a lot Rene and Mark, I am in a phase of learning the Linux Device Drivers. I am trying to write a KDB module. This will add a new command in KDB to display the registered

Re: Getting the list of the file systems which are mounted.

2008-08-03 Thread Prasad Joshi
On Sun, Aug 3, 2008 at 10:34 PM, Rene Herman [EMAIL PROTECTED]wrote: On 03-08-08 17:44, Prasad Joshi wrote: I am calling a function get_filesystem_list() from a module which I am writing. During the compilation I am getting the error WARNING: get_filesystem_list [module name] undefined

debugfs: link count is not getting properly updated.

2008-05-30 Thread Prasad Joshi
Hi All, I am facing a problem where link count is not getting properly updated in the debugfs. I am using e2fsprogs. [EMAIL PROTECTED] debugfs]# mkfs -t ext2 /dev/ram0 mke2fs 1.40.10 (21-May-2008) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) 4096 inodes,

Re: debugfs: link count is not getting properly updated.

2008-05-30 Thread Prasad Joshi
. Thanks and Regards, Prasad. On Fri, May 30, 2008 at 11:54 AM, Manish Katiyar [EMAIL PROTECTED] wrote: On Fri, May 30, 2008 at 11:31 AM, Prasad Joshi [EMAIL PROTECTED] wrote: Hi All, I am facing a problem where link count is not getting properly updated in the debugfs. I am using

Re: Need help in using debugFs.

2008-05-28 Thread Prasad Joshi
Yes, I read the code On Wed, May 28, 2008 at 5:44 PM, Manish Katiyar [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 5:43 PM, Manish Katiyar [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 5:06 PM, Prasad Joshi [EMAIL PROTECTED] wrote: Thanks a lot for all the replies. I am able

Re: Need help in using debugFs.

2008-05-28 Thread Prasad Joshi
On Wed, May 28, 2008 at 6:45 PM, Manish Katiyar [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 5:55 PM, Prasad Joshi [EMAIL PROTECTED] wrote: Yes, I read the code On Wed, May 28, 2008 at 5:44 PM, Manish Katiyar [EMAIL PROTECTED] wrote: On Wed, May 28, 2008 at 5:43 PM, Manish