Re: Compiling for two different processors
Just a heads up. Try not to top post here. See my comment inline. On Dec 8, 2010, at 2:10 AM, Alex John a...@archeleus.com wrote: Thanks, I'll compile for P4 then. I was just thinking and realized the core2 may have been based off the p3 arch and the p4 was a dead end, but normally with intel you can compile for the LCD, but I may have lied this time. Also, I believe one is 32bit and the other is 64bit, but a 32 bit kernel will work on both. If you want to guarantee it works on both I would compile for 32bit i386, but feel free to have some fun. If you do compile with p4 post if it worked on the core2, I am sort of interested now. Sorry for the confusion. -- John -- 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: Video driver error(?)
Hi, I was compiling earlier today and I got stuck with make[4]: *** [drivers/media/video/cx23885/cx23885-cards.o] Error 1 This message is not going to be helpful at all. The compilation error should be higher in the compile log. You may also want to run make V=1 in order to get a more verbose output about what is going on. Alex.
Re: {Linux Kernel + Ramfs}ISOImage on VirtualBox Howto?
Hi Mulyadi Santosa, On Wed, Dec 8, 2010 at 7:00 AM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: I am trying to learn details of Linux kernel using virtualbox. I have compiled my kernel for i386_defconfig and with the following values set, (*) CONFIG_BLK_DEV_INITRD=y (*) CONFIG_INITRAMFS_SOURCE=/workspace/tmp/initramfs My basic filesystem with busybox utility is created under /workspace/tmp/initramfs which is given as the value for CONFIG_INITRAMFS_SOURCE. I am not trying to divert your study focus, but AFAIK it's easier in Qemu. Try something like: qemu -kernel your-kernel-image -initrd your-initramfs -- Thanks, this worked :). With socat to create virtualport, I was also able to get the debug messages printed on the virtual serial console. Actually myself my friends are trying to help some juniors start of in this path of learning Linux Internals by experimentation, without the need of a separate h/w. Hence I was trying to get Linux booting off Virtualbox with bare minimal filesystem as ISO image (and without the complexity of bootloaders). And qemu with its speed and simplicity of usage, would perfectly fit the bill. Thanks again for the suggestion :) Regards, Subbu
Re: scheduler_tick() confusing comment: called from fork code
On Wed, Dec 8, 2010 at 1:29 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi Lalit... On Wed, Dec 8, 2010 at 13:15, lalit mohan tripathi lalit.tripa...@gmail.com wrote: Thanks for your reply. The global timer interrupt is called periodically at the HZ frequency (or as set for per-cpu local timers in case of SMP). Can you shed more light about what you mean by timer interrupt is reenabled? In my thinking timer interrupt (single-core: global timer interrupt, SMP: local timer interrupt) would anyway run at regular interval (unless preemption is disabled for brief moment). OK, since I am more or less as clueless as you are (can't find any exact code trace so far), so I'd just share my suspicion: As the comment says this function (scheduler_tick) is also called when parent's time slice is recalculated, I highly suspect that at that recalculation stage, timer interrupt is disabled. Thus, scheduler_tick...for few moments is also skipped. Why I guess so? If recalculation happen and at the same time timer interrupt is still running, quite likely one will disrupt other. The net result: time slice final value isn't as expected. Once the recalculation is done, timer interrupt should be re-enabled. Thus, at this point, scheduler tick...indirectly is also called. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com Thanks for sharing your opinion. So, it means that the comment (this function (scheduler_tick) is also called when parent's time slice is recalculated) is incorrect or has become obsolete in new kernel codes (currently 2.6.30 ~ 2.6.36). Can anybody confim about it? -- 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
Layer-7 software balance in kernel
Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? Projects, papers and any useful information are very appreciative! Thanks!
Re: Layer-7 software balance in kernel
On Wed, Dec 8, 2010 at 11:36 AM, lijin liu llj...@gmail.com wrote: Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? Layer 7 is application space, so you can use any thing available in user space.
Re: Layer-7 software balance in kernel
On Wed, Dec 8, 2010 at 11:49 AM, Anuz Pratap Singh Tomar chambilketha...@gmail.com wrote: On Wed, Dec 8, 2010 at 11:36 AM, lijin liu llj...@gmail.com wrote: Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? Layer 7 is application space, so you can use any thing available in user space. Probably this may help http://www.linux.com/archive/feed/46735
Re: scheduler_tick() confusing comment: called from fork code
Hi, It seems that this is obsolete.. There is a call in 2.6.12.6 kernel (during fork), but not in the latest kernel. Please refer to: http://lxr.linux.no/linux+v2.6.12/kernel/sched.c http://lxr.linux.no/linux+v2.6.12/kernel/sched.c On Wed, Dec 8, 2010 at 6:33 PM, lalit mohan tripathi lalit.tripa...@gmail.com wrote: On Wed, Dec 8, 2010 at 1:29 PM, Mulyadi Santosa mulyadi.sant...@gmail.com wrote: Hi Lalit... On Wed, Dec 8, 2010 at 13:15, lalit mohan tripathi lalit.tripa...@gmail.com wrote: Thanks for your reply. The global timer interrupt is called periodically at the HZ frequency (or as set for per-cpu local timers in case of SMP). Can you shed more light about what you mean by timer interrupt is reenabled? In my thinking timer interrupt (single-core: global timer interrupt, SMP: local timer interrupt) would anyway run at regular interval (unless preemption is disabled for brief moment). OK, since I am more or less as clueless as you are (can't find any exact code trace so far), so I'd just share my suspicion: As the comment says this function (scheduler_tick) is also called when parent's time slice is recalculated, I highly suspect that at that recalculation stage, timer interrupt is disabled. Thus, scheduler_tick...for few moments is also skipped. Why I guess so? If recalculation happen and at the same time timer interrupt is still running, quite likely one will disrupt other. The net result: time slice final value isn't as expected. Once the recalculation is done, timer interrupt should be re-enabled. Thus, at this point, scheduler tick...indirectly is also called. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com Thanks for sharing your opinion. So, it means that the comment (this function (scheduler_tick) is also called when parent's time slice is recalculated) is incorrect or has become obsolete in new kernel codes (currently 2.6.30 ~ 2.6.36). Can anybody confim about it? -- 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 -- Regards, Himanshu
Re: {Linux Kernel + Ramfs}ISOImage on VirtualBox Howto?
Hi :) ! On Wed, Dec 8, 2010 at 16:27, Ponmuthu Subramaniam Nandan subb...@gmail.com wrote: Thanks, this worked :). With socat to create virtualport, I was also able to get the debug messages printed on the virtual serial console. Actually myself my friends are trying to help some juniors start of in this path of learning Linux Internals by experimentation, without the need of a separate h/w. Glad to hear :) Well, that's all I know. But of course, /me personally would be more than glad to hear how to do exactly the same thing in VirtualBox and/or VMWare or possibly other virtualization software as well. And qemu with its speed and simplicity of usage, would perfectly fit the bill. Thanks again for the suggestion :) Thanks to the new TCG, qemu is now becomes faster. And latest patch that floated in last few days to speed up translation block lookup would probably make it even faster in some cases. The same trick should also apply on qemu-kvm as well AFAIK. Your call :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.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: scheduler_tick() confusing comment: called from fork code
Hi... On Wed, Dec 8, 2010 at 21:39, Himanshu Maithani hmaith...@gmail.com wrote: Hi, It seems that this is obsolete.. There is a call in 2.6.12.6 kernel (during fork), but not in the latest kernel. Please refer to: http://lxr.linux.no/linux+v2.6.12/kernel/sched.c ACK, http://lxr.linux.no/linux+v2.6.12/kernel/sched.c#L1178 says so OK, Lalit, it's your chance to submit a patch to LKML to fix this issue :) What do you think? -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.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: Layer-7 software balance in kernel
On Wed, Dec 8, 2010 at 18:36, lijin liu llj...@gmail.com wrote: Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? seems like http://kb.linuxvirtualserver.org/wiki/Load_balancing#Layer-7_Load_Balancing would fit your bill :) Have a look :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.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
VFS layer filesytem tracking
Hello all, I want to track the read/write operations for a particular inode at the vfs layer. I added the following structure as a field to struct inode. struct meta_info { unsigned int read_count; unsigned int write_count; }; This caused a problem in mounting the root device , what could be the cause ? Am i allowed modify the struct inode by adding a new field ? Also, i would like to know if there are any existing mechanisms that can help me track the workload . at various levels Thanks, sanoj
Re: VFS layer filesytem tracking
On Wed, Dec 8, 2010 at 23:00, sanoj k.u.sa...@gmail.com wrote: Hello all, I want to track the read/write operations for a particular inode at the vfs layer. Try inotify -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.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: VFS layer filesytem tracking
On Wed, Dec 8, 2010 at 11:00 AM, sanoj k.u.sa...@gmail.com wrote: Hello all, I want to track the read/write operations for a particular inode at the vfs layer. I added the following structure as a field to struct inode. struct meta_info { unsigned int read_count; unsigned int write_count; }; This caused a problem in mounting the root device , what could be the cause ? Am i allowed modify the struct inode by adding a new field ? Also, i would like to know if there are any existing mechanisms that can help me track the workload . at various levels Thanks, sanoj There are 2 instances of inode I believe. One is the on disk layout, and one is the ram layout. You can modify the ram layout to your hearts content, but the disk layout you have to be very precise with. The trouble is the ram instance will of course be free'd from time to time, so you can't keep data in there forever. I don't positively recall the lifetime rules for the ram instance, but I think as long as a file is open, the inode is kept in RAM. I also think there are ways to lock an inode in RAM if you need it RAM resident over multiple open/close sessions. Greg -- Greg Freemyer Head of EDD Tape Extraction and Processing team Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer CNN/TruTV Aired Forensic Imaging Demo - http://insession.blogs.cnn.com/2010/03/23/how-computer-evidence-gets-retrieved/ The Norcross Group The Intersection of Evidence Technology http://www.norcrossgroup.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: VFS layer filesytem tracking
On Wed, Dec 8, 2010 at 8:00 AM, sanoj k.u.sa...@gmail.com wrote: Hello all, I want to track the read/write operations for a particular inode at the vfs layer. I added the following structure as a field to struct inode. struct meta_info { unsigned int read_count; unsigned int write_count; }; Looking at the fields it seems you want this only incore...and I guess you want to count how many reads or writes came to a particular file. This caused a problem in mounting the root device , what could be the cause ? Can you tell us what was the error/problem ? Stack trace would be better. Am i allowed modify the struct inode by adding a new field ? Sure :-) ... you are allowed to modify incore ondisk anything as long as you make code understand those structures (or if you are adding something in spare bytes which might get ignored). If you change something ondisk structure you will need to fix other userspace utilities which may parse this (in the worst case throw away your old filesystem and create new one if it changes the size of ondisk inode). Also, i would like to know if there are any existing mechanisms that can help me track the workload . at various levels Thanks, HTH sanoj -- Thanks - Manish == [$\*.^ -- I miss being one of them == -- 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: Layer-7 software balance in kernel
On Wed, Dec 8, 2010 at 6:36 AM, lijin liu llj...@gmail.com wrote: Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? I remember an iptables extension for layer7 matching, but I do not know if it ever made it into the kernel. It is kernel code though which allows iptables to match packets in very scary places, anyways I have never used it myself, but it looked cool when I saw it. http://l7-filter.sourceforge.net/HOWTO -- John -- 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
QEMU Uncompressing Linux.... stalls
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 Uncompressing Linux... To debug I tried adding few prints in QEMU code, it seems to be working I could see continues calls to cpu_exec() and cpu_arm_exec(). Then I added few prints around gunzip code in the kernel, the function zlib_inflate() is not returning. r...@prasad-desktop:~# du -sh clfskernel-2.6.36 1.7Mclfskernel-2.6.36 r...@prasad-desktop:~# du -sh rootfs.gz 744Krootfs.gz r...@prasad-desktop:~# du -sh initrd-rootfs 128Minitrd-rootfs r...@prasad-desktop:~# du -sh initrd-rootfs.gz 37M initrd-rootfs.gz initially I was using initrd-rootfs.gz (37M) as my root file system. I thought of creating one more rootfs with less size (744K). None of them is working. So the problem seems to be with the kernel image (zImage) but it is already very small (1.7M). Can someone please help? Please keep me in CC as I am not subscribed to the mailing list. Thanks and Regards, Prasad -- 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: QEMU Uncompressing Linux.... stalls
On Thursday 09 Dec 2010 12:34:54 am Prasad Joshi wrote: 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 Uncompressing Linux... To debug I tried adding few prints in QEMU code, it seems to be working I could see continues calls to cpu_exec() and cpu_arm_exec(). Then I added few prints around gunzip code in the kernel, the function zlib_inflate() is not returning. r...@prasad-desktop:~# du -sh clfskernel-2.6.36 1.7M clfskernel-2.6.36 r...@prasad-desktop:~# du -sh rootfs.gz 744K rootfs.gz r...@prasad-desktop:~# du -sh initrd-rootfs 128M initrd-rootfs r...@prasad-desktop:~# du -sh initrd-rootfs.gz 37M initrd-rootfs.gz initially I was using initrd-rootfs.gz (37M) as my root file system. I thought of creating one more rootfs with less size (744K). None of them is working. So the problem seems to be with the kernel image (zImage) but it is already very small (1.7M). Can someone please help? Please keep me in CC as I am not subscribed to the mailing list. Thanks and Regards, Prasad -- 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 Maybe its uncompressing onto itself. Can you change the start address of the kernel uncompressing to a higher address? I used to change the link_address start on my powerpc when it used to hang when uncompressing. -- 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: Layer-7 software balance in kernel
Thanks a lot , I will try KTCPVS! On Wed, Dec 8, 2010 at 11:46 PM, Mulyadi Santosa mulyadi.sant...@gmail.comwrote: On Wed, Dec 8, 2010 at 18:36, lijin liu llj...@gmail.com wrote: Hi all I want to write a layer-7 software load balancer. I know LVS but it seems that only support layer-4. So, anybody knows the information about layer-7 balancer in the kernel? seems like http://kb.linuxvirtualserver.org/wiki/Load_balancing#Layer-7_Load_Balancing would fit your bill :) Have a look :) -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
Re: QEMU Uncompressing Linux.... stalls
Hi, There is probably a kernel misconfiguration somewhere. Could you post your .config, and maybe even your vmlinux somewhere where we can download it? 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 a short explanation: http://wiki.osdev.org/GDB Alex.
mutex unlock order
Hi! I have came upon an interesting situation where I am not sure about mutex semantics. What I want to do is something like this: mutex_lock(global_lock); mutex_lock(small_lock); do_something_small_which_requires_both_locks(); do_something_big_which_requires_only_small_lock(); mutex_unlock(small_lock); mutex_unlock(global_lock); I want to avoid holding the global lock while doing something_big. Can I do something like this: mutex_lock(global_lock); mutex_lock(small_lock); do_something_small_which_requires_both_locks(); mutex_unlock(global_lock); do_something_big_which_requires_only_small_lock(); mutex_unlock(small_lock); The mutex_lock order cannot be changed due to deadlocks. Releasing small_lock and then reaquiring might be possible, but looks pretty fragile. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.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