Re: [Celinux-dev] [Q] TinyLinux project status (resend)
Hello Greg, Le Thu, 26 Apr 2012 09:56:23 +1000, Greg Ungerer g...@snapgear.com a écrit : I couldn't see any kernel patches linked here. Did you need any, or have you posted them somewhere else? The kernel patch is at http://lists.busybox.net/pipermail/buildroot/2012-April/052585.html, hidden inside a Buildroot patch. I haven't posted it anywhere else because it's a hack to workaround a Qemu problem: the 5208 apparently has support for separate supervisor and userspace stack pointers (through two different registers), but Qemu doesn't emulate that. So I think it's a flaw in Qemu emulation rather than a kernel problem, but it was easier for now to workaround it by just adding one select COLDFIRE_SW_A7. Nice to see that it can run under QEMU! Well, as I said, it actually doesn't run very well: if I use /bin/sh as init=, then I can run *one* command, and the kernel crashes :-) So we can say it boot all the way to userspace, but userspace isn't very useful :) Regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Profiling my Modules
Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it seems that I will have to build the whole kernel, and also that it will be difficult to profile my module through it. Any trick or tool will do. -- Regards, Rishi Agrawal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Driver Project
On Thu, Apr 26, 2012 at 8:59 AM, Rabee Al-Maqabi rabee.almaq...@gmail.com wrote: On Wed, Apr 25, 2012 at 8:26 PM, Javier Martinez Canillas martinez.jav...@gmail.com wrote: On Wed, Apr 25, 2012 at 11:19 AM, Rabee Al-Maqabi rabee.almaq...@gmail.com wrote: Hi, I am looking for not yet supported piece of hardware to write a driver for it. anyone can help? Regards, Rabee Al-Maqabi Hi Rabee, Linux Device Drivers 3rd edition (LDD3) is a great book to learn how to write Linux device drivers. The best thing about this book is that teaches how to write device drivers for memory-based virtual devices, which mean that you don't need any special hardware to run the example drivers on your computer. Fortunately the Linux internal API is not stable and that allows us to improve the kernel every day. But this has the side effect that any documentation about the Linux kernel quickly becomes obsolete. A long time ago I updated the LDD3 examples so they could be compiled and used on newer kernels, this was for academic purposes so my students would be able to use that code. Sadly I haven't had any time to update to more recent kernels so if you want to work on Linux device drivers you can fork my tree [1] and make the drivers work on recent kernels, I know that many people would be happy (specially students). [1]: https://github.com/martinezjavier/ldd3 Best regards, -- Javier Martínez Canillas (+34) 682 39 81 69 Barcelona, Spain Hi Javier, Thank you for your reply. Linux Device Drivers is indeed a great book. I have read it in addition to Understanding the Linux Kernel and I have experimented with my Linux box. At this point, I would like to have a real-world experience and write a driver for a piece of hardware not yet supported. Best regards, -- Rabee Al-Maqabi Ok, in that case you can buy an IGEPv2 board (http://www.isee.biz/products/processor-boards/igepv2-board) from Spaniard company ISEE. ISEE manufactures very powerful System-on-Chip ARM OMAP3 based boards. They don't use the mainline kernel but instead have their own forked v2.3.37 kernel and their own first stage bootloader (igep-x-loader). ISEE code can be found here: http://git.isee.biz/ So a great project could be give complete support to this board on the mainline kernel. IGEPv2 is one of the boards that Linaro uses as a reference for OMAP3 to test their kernels and rootfs images. I own one of these boards an in my free time I hack both the kernel and the U-boot bootloader to properly support the IGEPv2, but there is a lot of work to do and I found everytime more hard to find free time to work on this. So if you want to join me on this project it would be great :-) Best regards, -- Javier Martínez Canillas (+34) 682 39 81 69 Barcelona, Spain ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: side effects of calling interruptible_sleep_on_timeout()
On 04/26/2012 10:03 AM, Arun KS wrote: Hi Srivatsa, On Wed, Apr 25, 2012 at 3:56 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 04/25/2012 03:36 AM, Philipp Ittershagen wrote: Hi Devendra, On Tue, Apr 24, 2012 at 03:24:23PM +0530, devendra rawat wrote: Hi, A switch driver is causing soft lockup on Montavista Linux Kernel 2.6.10 system. While browsing through the code of the driver. I came across a snippet where after disabling the interrupts a call is made to interruptible_sleep_on_timeout(). The code snippet is like cli(); init_waitqueue_head(queue); interruptible_sleep_on_timeout(queue, USEC_TO_JIFFIES(usec)); thread_check_signals(); sti(); I need to know the side effect of this sort of code, can it be responsible for the softlockup of the system ? Its a PowerPC based system. you cannot call sleep functions after disabling interrupts, because no interrupt will arrive for the scheduler to see the timeout and resume your task. Yes, that's right. Also, in general, sleeping inside atomic sections (eg., sections with interrupts disabled or preempt disabled) is wrong. There is a config option in the kernel that you can use to enable sleep-inside-atomic-section-checking (CONFIG_DEBUG_ATOMIC_SLEEP I believe), which can help you pin-point such bugs easily. I tired an experiment to check this. /* disable interrupts and preemption */ spin_lock_irqsave(lock, flags); /* enable preemption, but interrupt still disabled */ spin_unlock(lock); /* Now schedule something else */ schedule_timeout(10 * HZ); But this is not causing any harm. I m able to call schedule with interrupt disabled and system works fine afterwards. So when I looked inside the schedule() function, it checks only whether preemption is disabled or not. schedule calls BUG() only if preemption is disabled and not if interrupts are disabled. And AFAIK there is no fuction inside the kernel which tells you that interrupt are disabled. So explantion why system works fine after calling a schedule with interrupt disabled go here, There is a raw_spin_lock_irq(rq-lock) inside the __schedule() which in turn calls local_irq_disable(). local_irq_disable/enable() functions are not nested. We dont have reference counting. One call to local_irq_enable is enough to enable multiple calls of local_irq_disable(). So my inference is that if you call a schedule with interrupt disable will not cause any problem. Because schedule function enable it back before we really schedules out. But call to schedule() with preemtion disabled will end up in famous BUG scheduling while atomic. Indeed, you are right! And your experiment and analysis is perfect too! Sorry for the confusion - I had used the term atomic quite loosely. But your careful experiment of just re-enabling preemption, while still keeping the interrupts disabled was a very good one! And to add to what you said above, the __schedule() also does a preempt_enable() to re-enable preemption (which it had disabled at the beginning). But since preempt_disable() can nest, if we had called __schedule() with preemption already disabled, then we end up in trouble - and hence the BUG is fired in such cases. Thanks for the clarification! Regards, Srivatsa S. Bhat ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Open to work for any kernel module
On Thu, Apr 26, 2012 at 2:18 AM, Anil Varma Biruduraju anilvarm...@gmail.com wrote: Hi Anuz, Thanks for the reply.. I looked at the Kernel janitors web link but dont know where to start I see coding standards and wondering what to do... I know I might me asking a lot but can you please let to know where to start and whom to contact first.. Thank you there is a kernel janitor mailing list, also try looking for kernel bugs at kernel bugzilla, you may find something interesting: https://bugzilla.kernel.org Regards, Anil Varma B. On Mon, Apr 23, 2012 at 4:27 AM, Anuz Pratap Singh Tomar chambilketha...@gmail.com wrote: On Mon, Apr 23, 2012 at 6:12 AM, Anil Varma Biruduraju anilvarm...@gmail.com wrote: Hi All, Please let me know if I can start working on some kernel modules. Thank you. Try to look up in kernel janitors. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [Celinux-dev] [Q] TinyLinux project status (resend)
Le Thu, 26 Apr 2012 20:13:08 +1000, Greg Ungerer g...@snapgear.com a écrit : I haven't posted it anywhere else because it's a hack to workaround a Qemu problem: the 5208 apparently has support for separate supervisor and userspace stack pointers (through two different registers), but Qemu doesn't emulate that. So I think it's a flaw in Qemu emulation rather than a kernel problem, but it was easier for now to workaround it by just adding one select COLDFIRE_SW_A7. Ah, ok. I only put the dual stack pointer support in a year or 2 back. And it is only supported on the more modern ColdFire's, guess the QEMU support is for the simpler parts :-) Well, either Qemu pretends to emulate a 5208 and it should support the dual stack pointer thing, or it shouldn't pretend to emulate a 5208. Am I correct in my understanding is that the 5208 hardware does support dual stack pointers? Best regards, Thomas -- Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: side effects of calling interruptible_sleep_on_timeout()
On Thu, Apr 26, 2012 at 3:48 PM, Shashidhara Shamaiah shashidhara.shama...@mphasis.com wrote: Hi Arun, My question is how will the scheduler run, if interrupts are disabled on the local CPU. As timer interrupt controls the CPU? scheduler is nothing but a piece of code( __schedule()) which is just like any other function. If interrupts are disabled, you wont be getting the timer interrupts. So time slice will never get elapsed, which in turn allows current process to run for ever until it calls schedule again or exits. But as we figured out that __scheduler is enabling the interrupts back before we really schedules out. So this problem won't occur in our Linux kernel. Thanks, Arun Regards Shashidhara -Original Message- From: Arun KS [mailto:getaru...@gmail.com] Sent: Thursday, April 26, 2012 11:36 AM To: Shashidhara Shamaiah Subject: Re: side effects of calling interruptible_sleep_on_timeout() Hi, My code is, /* disable interrupts and preemption */ spin_lock_irqsave(lock, flags); /* enable preemption, but interrupt still disabled */ spin_unlock(lock); /* Now schedule something else */ schedule_timeout(10 * HZ); If you see the second step spin_unlock(lock). This will enable the preemtion back. Arun On Thu, Apr 26, 2012 at 11:26 AM, Shashidhara Shamaiah shashidhara.shama...@mphasis.com wrote: Hi Arun, I think if you run the code on a SMP machine, then the BUG() in schedule() will be triggered as spinlock_irqsave() disables preemption for a SMP. Regards Shashidhara -Original Message- From: Arun KS [mailto:getaru...@gmail.com] Sent: Thursday, April 26, 2012 10:41 AM To: Shashidhara Shamaiah Subject: Re: side effects of calling interruptible_sleep_on_timeout() Hello Shashidhara, My machine is UP. thanks, Arun On Thu, Apr 26, 2012 at 10:23 AM, Shashidhara Shamaiah shashidhara.shama...@mphasis.com wrote: Hi Arun, One more question regarding your experiment. Were you running your code on a UP or SMP machine? Regards Shashidhara -Original Message- From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies-boun...@kernelnewbies.org] On Behalf Of Arun KS Sent: Thursday, April 26, 2012 10:03 AM To: Srivatsa S. Bhat Cc: vinayak menon; Philipp Ittershagen; devendra rawat; kernelnewbies@kernelnewbies.org Subject: Re: side effects of calling interruptible_sleep_on_timeout() Hi Srivatsa, On Wed, Apr 25, 2012 at 3:56 PM, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: On 04/25/2012 03:36 AM, Philipp Ittershagen wrote: Hi Devendra, On Tue, Apr 24, 2012 at 03:24:23PM +0530, devendra rawat wrote: Hi, A switch driver is causing soft lockup on Montavista Linux Kernel 2.6.10 system. While browsing through the code of the driver. I came across a snippet where after disabling the interrupts a call is made to interruptible_sleep_on_timeout(). The code snippet is like cli(); init_waitqueue_head(queue); interruptible_sleep_on_timeout(queue, USEC_TO_JIFFIES(usec)); thread_check_signals(); sti(); I need to know the side effect of this sort of code, can it be responsible for the softlockup of the system ? Its a PowerPC based system. you cannot call sleep functions after disabling interrupts, because no interrupt will arrive for the scheduler to see the timeout and resume your task. Yes, that's right. Also, in general, sleeping inside atomic sections (eg., sections with interrupts disabled or preempt disabled) is wrong. There is a config option in the kernel that you can use to enable sleep-inside-atomic-section-checking (CONFIG_DEBUG_ATOMIC_SLEEP I believe), which can help you pin-point such bugs easily. I tired an experiment to check this. /* disable interrupts and preemption */ spin_lock_irqsave(lock, flags); /* enable preemption, but interrupt still disabled */ spin_unlock(lock); /* Now schedule something else */ schedule_timeout(10 * HZ); But this is not causing any harm. I m able to call schedule with interrupt disabled and system works fine afterwards. So when I looked inside the schedule() function, it checks only whether preemption is disabled or not. schedule calls BUG() only if preemption is disabled and not if interrupts are disabled. And AFAIK there is no fuction inside the kernel which tells you that interrupt are disabled. So explantion why system works fine after calling a schedule with interrupt disabled go here, There is a raw_spin_lock_irq(rq-lock) inside the __schedule() which in turn calls local_irq_disable(). local_irq_disable/enable() functions are not nested. We dont have reference counting. One call to local_irq_enable is enough to enable multiple calls of local_irq_disable(). So my inference is that if you call a schedule with interrupt disable will not cause any problem. Because schedule function enable it back before we really schedules out. But call to
Re: Profiling my Modules
On Thu, Apr 26, 2012 at 10:33 AM, Rishi Agrawal rishi.b.agra...@gmail.com wrote: Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it seems that I will have to build the whole kernel, and also that it will be difficult to profile my module through it. Any trick or tool will do. Hello, Have a look at perf [1]. thanks, Daniel. [1] https://perf.wiki.kernel.org/ ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Driver Project
Rabee Al-Maqabi rabee.almaq...@gmail.com writes: Thank you for your reply. Linux Device Drivers is indeed a great book. I have read it in addition to Understanding the Linux Kernel and I have experimented with my Linux box. At this point, I would like to have a real-world experience and write a driver for a piece of hardware not yet supported. How about a fingerprint scanner? If you've got a modern laptop then chances are good that you already own such a device. And it's most likely unsupported. Some might say that's because it's useless :-) Otherwise I'd recommend looking through your box of unused devices. No need to go out and buy anything if all you want is to write some driver. Or see http://www.linuxdriverproject.org/foswiki/bin/view/Main/DriversNeeded if you are open to buying some new device for this project. You won't find any datasheets or any other documentation, though... Manufacturers smart enough to provide documentation usually get drivers written for their devices in no time. But some still hold it to themselves. Go figure. Bjørn ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Profiling my Modules
Thanks a lot, I will have a look at it and see if it helps. On Thu, Apr 26, 2012 at 6:12 PM, Daniel Baluta daniel.bal...@gmail.comwrote: On Thu, Apr 26, 2012 at 10:33 AM, Rishi Agrawal rishi.b.agra...@gmail.com wrote: Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it seems that I will have to build the whole kernel, and also that it will be difficult to profile my module through it. Any trick or tool will do. Hello, Have a look at perf [1]. thanks, Daniel. [1] https://perf.wiki.kernel.org/ -- Regards, Rishi Agrawal ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Linux Driver Project
Bjørn Mork bj...@mork.no writes: How about a fingerprint scanner? If you've got a modern laptop then chances are good that you already own such a device. And it's most likely unsupported. Some might say that's because it's useless :-) Sorry, please ignore this. I should have read http://www.linuxdriverproject.org/foswiki/bin/view/Main/NoLinuxDriverNeeded first. Bjørn ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
freelance kernel work
I'm not looking for work, nor do I have any work for others. I'm just curious if there is a central location where freelance kernel developers hang out. I've never seen any email on mailing lists like I have some hardware and want somebody to write a kernel module for it. I thought that sort of request would have been common. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Netlabel
Hi all, is anyone here familiar with Netlabel ? I am trying to label network packets using CIPSO tags from a LSM module. Rather than using the Netlink interface to configure Netlabel from userspace, I try to setup everything from kernelspace. The way I initialize netlabel is similar to what smack does in smk_cipso_doi() (security/smack/smackfs.c). What I am trying to do is the following : - no packet should ever get dropped - unlabeled packets can stay unlabeled, I don't need to assign them any DOI - labeled packets carry information that is only useful to my LSM module (bitmaps) Now, everytime I label a socket, packets get dropped. I read in the RFC about configuration settings such as HOST_LABEL_MAX and so on, but as far as I understand, it is up to the module itself to make such verifications. Is netlabel enforcing any sort of policy here ? Is there anyway I can configure netlabel to never drop packets ? Kind regards, -- Christophe ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Reg: 16 unknown bytes in ESp packet(IPSEC)
Hi, Not able to understand 16 byetes in ESP packet present after sequence no and before Original IP header while doing tunnel mode Ipsec with ESP. Details are as below. I am trying to achieve Ipsec functionality using fast-path application which will do encryption/decryption using some hardware(Cavium) specific API. This application will by-pass the IP layer of kernel.. Keys for start-up are pre-shared. Communication is done between two machine A and B. On Machine A running i386 linux, SA/SP database are updated using setkey utility and packets is encrypted/decrypted using kernel Ipsec. On Machine B Cavium h/w, keys are pre-shared to application performing Ipsec functionlity... Example: M/c A configuration: add 50.50.50.51 50.50.50.53 esp 15701 -E aes-cbc 0123456789abcdef; spdadd 10.10.10.20 10.10.10.21 any -P out ipsec esp/tunnel/50.50.50.51 50.50.50.53/require I am able to decrypt received packets on machine B send by M/c A and send encrypted packet to M/c A. Issue: 1. Not able to find what are 16 bytes present after sequence no in ESP header and before original IP header representing... Decrypted Packet on machine B is like below Ethernet header 14 bytes Outer Ip header 20 bytes ESP headerSPI 4 bytes Seq no 4 bytes Some data 16 bytes ??? Original IP header 20 bytes UDP header Payload data Padding Pad lenght Next Ip header 2. Packets send from machine B are encrypted and received as ESP packet on machine A.. Not sure if decryption is happening fine...Seems packets are dropped at IP layer.. Is there way to confirm if packet are decrypted fine by kernel IPSEC... Encrypted packet send by Machine B is having encrypted payload(of original IP header plus data) after Sequence number of ESP header... Seems 16 bytes mentioned above play role for successful decryption at machine A running Linux IPSEC Any Inputs for same will be appreciated for same Cheers Mukesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Kernelnewbies Digest, Vol 17, Issue 44
Hello guys, I am writing a user space code for pwm controller in beaglebone, but the drivers are in the form of files, so when I am writing the code I got a doubt that, if we keep access the files it may take more processor time so any other way is there to access or this is the best way ? On Thu, Apr 26, 2012 at 9:30 PM, kernelnewbies-requ...@kernelnewbies.orgwrote: Send Kernelnewbies mailing list submissions to kernelnewbies@kernelnewbies.org To subscribe or unsubscribe via the World Wide Web, visit http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies or, via email, send a message with subject or body 'help' to kernelnewbies-requ...@kernelnewbies.org You can reach the person managing the list at kernelnewbies-ow...@kernelnewbies.org When replying, please edit your Subject line so it is more specific than Re: Contents of Kernelnewbies digest... Today's Topics: 1. Re: Profiling my Modules (Daniel Baluta) 2. Re: Linux Driver Project (Bj?rn Mork) 3. Re: Profiling my Modules (Rishi Agrawal) 4. Re: Linux Driver Project (Bj?rn Mork) 5. freelance kernel work (Christopher Harvey) -- Message: 1 Date: Thu, 26 Apr 2012 15:42:57 +0300 From: Daniel Baluta daniel.bal...@gmail.com Subject: Re: Profiling my Modules To: Rishi Agrawal rishi.b.agra...@gmail.com Cc: kernelnewbies@kernelnewbies.org Message-ID: caenqrzcf1zjmaqse8uuytr7px6-k51flpb+vwy3smkdximc...@mail.gmail.com Content-Type: text/plain; charset=ISO-8859-1 On Thu, Apr 26, 2012 at 10:33 AM, Rishi Agrawal rishi.b.agra...@gmail.com wrote: Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it seems that I will have to build the whole kernel, and also that it will be difficult to profile my module through it. Any trick or tool will do. Hello, Have a look at perf [1]. thanks, Daniel. [1] https://perf.wiki.kernel.org/ -- Message: 2 Date: Thu, 26 Apr 2012 15:16:59 +0200 From: Bj?rn Mork bj...@mork.no Subject: Re: Linux Driver Project To: Rabee Al-Maqabi rabee.almaq...@gmail.com Cc: Javier Martinez Canillas martinez.jav...@gmail.com, kernelnewbies@kernelnewbies.org Message-ID: 87fwbqeipg@nemi.mork.no Content-Type: text/plain; charset=utf-8 Rabee Al-Maqabi rabee.almaq...@gmail.com writes: Thank you for your reply. Linux Device Drivers is indeed a great book. I have read it in addition to Understanding the Linux Kernel and I have experimented with my Linux box. At this point, I would like to have a real-world experience and write a driver for a piece of hardware not yet supported. How about a fingerprint scanner? If you've got a modern laptop then chances are good that you already own such a device. And it's most likely unsupported. Some might say that's because it's useless :-) Otherwise I'd recommend looking through your box of unused devices. No need to go out and buy anything if all you want is to write some driver. Or see http://www.linuxdriverproject.org/foswiki/bin/view/Main/DriversNeeded if you are open to buying some new device for this project. You won't find any datasheets or any other documentation, though... Manufacturers smart enough to provide documentation usually get drivers written for their devices in no time. But some still hold it to themselves. Go figure. Bj?rn -- Message: 3 Date: Thu, 26 Apr 2012 19:01:00 +0530 From: Rishi Agrawal rishi.b.agra...@gmail.com Subject: Re: Profiling my Modules To: Daniel Baluta daniel.bal...@gmail.com Cc: kernelnewbies@kernelnewbies.org Message-ID: CADDndfPtRis6CuXJN7D0v=sncj8b_hs0ew2cqobekxe3uty...@mail.gmail.com Content-Type: text/plain; charset=iso-8859-1 Thanks a lot, I will have a look at it and see if it helps. On Thu, Apr 26, 2012 at 6:12 PM, Daniel Baluta daniel.bal...@gmail.com wrote: On Thu, Apr 26, 2012 at 10:33 AM, Rishi Agrawal rishi.b.agra...@gmail.com wrote: Hi All, I have a kernel module which has functions which take a lot of time in execution. I am curious to know how can I profile it, and find out the functions taking most of the time. I saw Oprofile, but it seems that I will have to build the whole kernel, and also that it will be difficult to profile my module through it. Any trick or tool will do. Hello, Have a look at perf [1]. thanks, Daniel. [1] https://perf.wiki.kernel.org/ -- Regards, Rishi Agrawal -- next part -- An HTML attachment was scrubbed... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120426/213b0716/attachment-0001.html -- Message: 4 Date: Thu, 26
Re: Kernelnewbies Digest, Vol 17, Issue 44
... URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120426/213b0716/attachment-0001.html -- Message: 4 Date: Thu, 26 Apr 2012 15:51:10 +0200 From: Bj?rn Mork bj...@mork.no Subject: Re: Linux Driver Project To: Rabee Al-Maqabi rabee.almaq...@gmail.com Cc: Javier Martinez Canillas martinez.jav...@gmail.com, kernelnewbies@kernelnewbies.org Message-ID: 877gx2eh4h@nemi.mork.no Content-Type: text/plain; charset=utf-8 Bj?rn Mork bj...@mork.no writes: How about a fingerprint scanner? If you've got a modern laptop then chances are good that you already own such a device. And it's most likely unsupported. Some might say that's because it's useless :-) Sorry, please ignore this. I should have read http://www.linuxdriverproject.org/foswiki/bin/view/Main/NoLinuxDriverNeeded first. Bj?rn -- Message: 5 Date: Thu, 26 Apr 2012 10:39:41 -0500 From: Christopher Harvey ch...@basementcode.com Subject: freelance kernel work To: kernelnewbies@kernelnewbies.org Message-ID: 8acfa9e97f0b3bca53f505c1aca01...@basementcode.com Content-Type: text/plain; charset=UTF-8; format=flowed I'm not looking for work, nor do I have any work for others. I'm just curious if there is a central location where freelance kernel developers hang out. I've never seen any email on mailing lists like I have some hardware and want somebody to write a kernel module for it. I thought that sort of request would have been common. -- ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies End of Kernelnewbies Digest, Vol 17, Issue 44 * -- Regards Jeshwanth Kumar N K +91-7411483498 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: stdout to console
Dude, It is more of implementation dependent. Where you want your output to display. pty is a method of sending data between two end points of communications but acts with concept of master and slave. It is written on tty driver. In case of ssh it is implementation dependent. I will leave it to you to understand the concept of vfs. Initially it is confusing, but there is lot of material online. You url is a good start. All the best. Sri. On Wed, Apr 25, 2012 at 11:56 PM, Arun KS getaru...@gmail.com wrote: Thanks Sri Ram and Jonathan, On Wed, Apr 25, 2012 at 11:39 PM, Sri Ram Vemulpali sri.ram.gm...@gmail.com wrote: Ok I see your problem. vfs maintains file descriptor table for every process in the system. At every index it stores information of descriptor type and device it points to. The indexes 0,1,2 have special meaning in the context of process. 0 indicates std input, 1 indicates std output and 2 indicates std err. So whenever you use open(), socket(), or any other system call which returns descriptor (expect fopen .. libc functions) is returning the index in to this table where the info about device or operation is stored. So, whenever you use that descriptor number with other sys calls it will map in to index and extracts the information. normal calls like printf, cout uses stdin, stdout, stderr for printing out. We all know that when an application writes to stdout, data ends up in the console. Because for that process index 1 maps to /dev/stdout Okey so if I m on my development board and if I run an app, all the prints comes to the console (eg /dev/ttyS0). same as above If I m on any server using ssh and all apps prints comes on my putty (eg through /dev/pts/176). its ssh implementation. It uses pty as stdout for printing. Okey In such case initializing stdout = fdopen on open(/dev/stdout, ) descriptor will do your job. or use dup to set index 1 to given fd in that process Hmm... Will sshd open /dev/stdout? I think it uses /dev/ptmx and /dev/pts/* device files. Plz have a look here, http://linux.die.net/man/4/pts Arun --Sri. On Mon, Apr 23, 2012 at 6:15 AM, Arun KS getaru...@gmail.com wrote: Hello Guys, We all know that when an application writes to stdout, data ends up in the console. Okey so if I m on my development board and if I run an app, all the prints comes to the console (eg /dev/ttyS0). If I m on any server using ssh and all apps prints comes on my putty (eg through /dev/pts/176). Where is the code which maps fd 1 to the console in kernel? If you guys have any pointers, please share. While opening a device (for eg /dev/something), the vfs calls that drivers, whose major and minor number matches. But in case of stdout, how vfs resolves the write to the fd 1 and send it to the corresponding console driver? Thanks, Arun ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Regards, Sri. -- Regards, Sri. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies