mntinfo of process
Hi, Considering the the output of #cat /proc/pid/mountinfo I have this line for one of my process 39 38 0:10 /1 /dev/console rw,relatime shared:7 - devpts devpts rw,mode=600,ptmxmode=000 Here, /1 is root: root of the mount within the filesystem.(man 5 proc) What is this /1? Thanks. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Handling interrupts in spidev
you can use Asynchronous notification , FASYNC . http://www.makelinux.net/ldd3/chp-6-sect-4 Regards, Nilesh On Tue, Jan 28, 2014 at 9:47 PM, Vishwanath Govind vishwanath.gov...@gmail.com wrote: You can implement irq handler in spi driver itself. SPI specific platform data can pass it from board file. Regards Vishwa On Tue, Jan 28, 2014 at 9:24 PM, Richard Weinberger rich...@nod.atwrote: Am 28.01.2014 15:12, schrieb Amit Mahadik: Thanks Richard. One more question. If I register an SPI irq struct spi_board_info spi_board_info[] structure in machine board.c file; then the request irq api and irq handler should be written in board.c file or in the spidev driver. Never do any programming in the board file. The purpose if the board file it describing the hardware. Please note, board files go away, device tree is the way to go. Thanks, //richard ___ 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 ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
[OOT] About the symbols in binary file.
Hi, The question is not completely related to kernel. But I came across similar question when debugging in kernel. I tried dissecting the SSL library using 'nm' command. It is showing the list of symbols along with some generic addresses (to be used when relocating). Also there are some characters 't', 'T', 'U'. I guess these correspond to properties of symbols - like static, extern etc. Could someone please point out what exactly each character corresponds to? I mean looking at the character, we should be able to denote if it's a static symbol or inline etc. Do we have any such mapping? 0499 t tls1_PRF 0019 t tls1_P_hash T tls1_alert_code 0937 T tls1_cert_verify_mac 0ffa T tls1_change_cipher_state 0a22 T tls1_enc 06fc T tls1_final_finish_mac 063d T tls1_generate_master_secret 1734 T tls1_mac 0d2a T tls1_setup_key_block -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: [OOT] About the symbols in binary file.
On Friday 20 January 2012 03:37 PM, Daniel Baluta wrote: On Fri, Jan 20, 2012 at 11:56 AM, nileshnilesh.tay...@netscout.com wrote: Hi, The question is not completely related to kernel. But I came across similar question when debugging in kernel. I tried dissecting the SSL library using 'nm' command. It is showing the list of symbols along with some generic addresses (to be used when relocating). Also there are some characters 't', 'T', 'U'. I guess these correspond to properties of symbols - like static, extern etc. Could someone please point out what exactly each character corresponds to? I mean looking at the character, we should be able to denote if it's a static symbol or inline etc. Do we have any such mapping? man nm :) Missed that..Sorry for being lazy to check before posting the dumb query. :) thanks, Daniel. -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Suspicious URL:Re: Check Interface Status
On Friday 30 December 2011 02:06 PM, mic...@michaelblizek.twilightparadox.com wrote: Hi! On 12:30 Fri 30 Dec , nilesh wrote: On Thursday 29 December 2011 08:23 PM, Rahul Kumar wrote: Hi, I would like to check the interface status (up/down) within linux kernel. Is there any routine (sort of ioctl) to do this. Any code that is already in use in kernel would also be helpful for me. Please let me know. I think netif_carrier_ok() could help. You can refer network driver code(e.g. e1000_main.c). This looks more like cable attached rather than interface up. Oh yes, it will just tell us if the carrier is available. IFF_UP flag is the right way, as you suggested in the other email. -Michi -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Check Interface Status
On Thursday 29 December 2011 08:23 PM, Rahul Kumar wrote: Hi, I would like to check the interface status (up/down) within linux kernel. Is there any routine (sort of ioctl) to do this. Any code that is already in use in kernel would also be helpful for me. Please let me know. I think netif_carrier_ok() could help. You can refer network driver code(e.g. e1000_main.c). -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Learning Linux Kernel
On Tuesday 13 December 2011 05:37 AM, Kaushal Shriyan wrote: On Tue, Dec 13, 2011 at 5:21 AM, Alexandru Juncualex.ju...@rosedu.orgwrote: On Tue, Dec 13, 2011 at 1:39 AM, Kaushal Shriyan kaushalshri...@gmail.com wrote: [...] [1] http://www.amazon.com/Linux-Kernel-Development-Robert-Love/dp/0672329468/ref=pd_sim_b_3 [2] http://www.youtube.com/watch?v=LLBrBBImJt4 Hi Just curious to know about total number of linux kernel developers in the world who contribute to linux kernel codebase. Any wiki or webpage which mentions about it? Also you might want to check this video uploaded on Youtube. Nice explanation on how exactly the Kernel Developers' community works, along with the statistics (old ones, though). http://www.youtube.com/watch?v=L2SED6sewRw Regards Kaushal -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Query about the realtime processes scheduling.
Hi, I am not too familiar with Linux scheduler. What I could understand theoretically is - the interactive processes get advantage (-5) in priority. And hence the effective priority is higher. Query: Is this true for realtime processes ( with SCHED_FIFO/SCHED_RR policy) as well? Could the realtime processes be I/O bound or interactive? -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Query about the realtime processes scheduling.
On Thursday 18 August 2011 12:18 PM, nilesh wrote: Hi, I am not too familiar with Linux scheduler. What I could understand theoretically is - the interactive processes get advantage (-5) in priority. And hence the effective priority is higher. Query: Is this true for realtime processes ( with SCHED_FIFO/SCHED_RR policy) as well? Could the realtime processes be I/O bound or interactive? Please ignore the post. I should have looked into the code before posting the query. It looks like the bonus/penalty is only for non-realtime tasks. 2101static int effective_prio(struct task_struct *p) 2102{ 2103p-normal_prio = normal_prio(p); 2104/* 2105 * If we are RT tasks or we were boosted to RT priority, 2106 * keep the priority unchanged. Otherwise, update priority 2107 * to the normal priority: 2108 */ 2109if (!rt_prio(p-prio)) 2110return p-normal_prio; 2111return p-prio; 2112} 2113 -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Query about a PCI device error detection.
Resending the email to kernelnewbies list as well (have sent the same to edac mailing list). Appreciate any pointers on below query, if any one has worked on edac. On Wednesday 06 July 2011 03:56 PM, nilesh wrote: Hi, I am fairly new to the edac driver and have some basic query regarding the error detection in case of PCI devices. I could see the module for memory controller's error detection is done s.t. UE/CE/controller specific errors are scanned and detected, also the PCI errors are also scanned. E.g. in case of i5400 : i5400_edac.c : i5400_probe1() { 1285 /* Set the function pointer to an actual operation function */ 1286 mci-edac_check = i5400_check_error; ... 1312 /* allocating generic PCI control info */ 1313 i5400_pci = edac_pci_create_generic_ctl(pdev-dev, EDAC_MOD_STR); } And we check the PCI status registers for the errors. edac_pci_generic_check() -- edac_pci_do_parity_check() -- edac_pci_dev_parity_test() So, i5400_check_error - detect UE/CE. edac_pci_generic_check - detect PCI errors. Query: -- * If one wants to get the errors harvested for non-MC device (e.g. ethernet controller etc.) is it going to be done through edac_pci_generic_check() automatically - as we already scan through all PCI devices in a loop? Is it required to add the separate module for that device? -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: xx_initcall ( ) in kernel
Hi Sumeet, On Wednesday 13 July 2011 04:12 PM, sumeet linux wrote: Dear friends, I want to know the basics xx_initcall ( ) in linux kernel. How this function works ? Observed in kernel code, many places late_initcall ( ), early_initcall ( ), arch_initcall ( ), core_initcall ( ) gets called. When did all these functions gets call during kernel initialization ? I am more interested in what is the sequence of these functions gets called one after another. I could get a nice link explaining about *_initcall(). Refer: http://book.opensourceproject.org.cn/embedded/embeddedprime/opensource/0136130550/ch05lev1sec4.html *_initcall() are macros which set the function pointers for subsystem initialization (typedef int (*initcall_t)(void) : typedef of all such function pointers). Also if we look at the source code, the functions are called in below sequence: http://lxr.linux.no/#linux+v2.6.39/init/main.c#L695 do_basic_setup(void) - do_initcalls(void) - do_one_initcall(*fn); do_one_initcall(*fn) - calls each function. And do_basic_setup() is called inside the initialization sequence (kernel_init()). Thank you. Regards, Sumeet -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: questions for Linus
On Wed, 2011-06-01 at 12:51 +0530, nilesh wrote: On Wed, 2011-06-01 at 16:02 +0900, Greg KH wrote: On Wed, Jun 01, 2011 at 12:10:45PM +0530, nilesh wrote: [...] It just happened a few hours ago, so I think it might be a week or so before the video is posted to the web site. I'll ask the orginizers and try to find out when it will show up. Ok. Thanks a lot. I just noticed the interview is now available on youtube also, in case someone missed it. http://www.youtube.com/watch?v=__fALdvvcM0 I'm sure there will be some news reports of the talk in a few days as well, there were lots of fun quotes that I'm sure will be repeated, they are already all over twitter in places... thanks, greg k-h -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Regarding Edac support on E8400 processor.
Hi, I am trying to enable and test EDAC functionality on my desktop running 2.6.39 kernel. But I do not see any EDAC support in /sys/devices (e.g. support for parity errors enable/disable for PCI devices etc.). Could someone please advice if I am missing anything? Is EDAC completely not supported for E8400 (I do not see the kernel module for this one)? -- Thanks, Nilesh P.S. Below are few of the details: * CPU information root@nilesh-desktop:linux-2.6.39 # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 23 model name : Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz stepping: 10 cpu MHz : 2000.000 cache size : 6144 KB * EDAC modules I tried to insert and were inserted without error. root@nilesh-desktop:linux-2.6.39 # lsmod | grep -i EDAC i7300_edac 12270 0 r82600_edac 3686 0 i5100_edac 5847 0 i5400_edac 12136 0 i5000_edac 13402 0 e7xxx_edac 5085 0 e752x_edac 11985 0 i7core_edac21192 0 edac_core 55426 8 i7300_edac,r82600_edac,i5100_edac,i5400_edac,i5000_edac,e7xxx_edac,e752x_edac,i7core_edac * Config file snippet. root@nilesh-desktop:linux-2.6.39 # cat .config | grep EDAC CONFIG_EDAC=y CONFIG_EDAC_DEBUG=y # CONFIG_EDAC_DECODE_MCE is not set CONFIG_EDAC_MM_EDAC=m CONFIG_EDAC_MCE=y CONFIG_EDAC_AMD76X=m CONFIG_EDAC_E7XXX=m CONFIG_EDAC_E752X=m CONFIG_EDAC_I82875P=m CONFIG_EDAC_I82975X=m CONFIG_EDAC_I3000=m CONFIG_EDAC_I3200=m CONFIG_EDAC_X38=m CONFIG_EDAC_I5400=m CONFIG_EDAC_I7CORE=m CONFIG_EDAC_I82860=m CONFIG_EDAC_R82600=m CONFIG_EDAC_I5000=m CONFIG_EDAC_I5100=m CONFIG_EDAC_I7300=m ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: questions for Linus
Hi Greg, Included the list as the recipient. On Wed, 2011-06-01 at 10:44 +0900, Greg KH wrote: On Tue, May 31, 2011 at 02:12:36PM +0700, Mulyadi Santosa wrote: Hi Greg.. I came with these questions for Linus, hope you're kind enough to collect it and forward it to Linus in LinuxCon: Thanks for all of the questions everyone, they helped out immensely and the interview went well. I think it will be posted online in video form soon, so check the linux foundation web site for the link if you are interested. Sorry if I got it wrong, but is the interview (in text form) or video posted on linuxfoundation? Or is it yet to be done? I visited the site and I do not see that. greg k-h -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Test message - please ignore.
My emails are not reaching to kernelnewbies list. This is a test message just to check. -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: spin_lock and scheduler confusion
On Fri, 2011-01-07 at 13:33 +0530, anish singh wrote: On Fri, Jan 7, 2011 at 1:19 PM, nilesh nilesh.tay...@netscout.com wrote: On Fri, 2011-01-07 at 13:05 +0530, Rajat Sharma wrote: As I remember timer interrupt as well is an NMI so, it is possible (although not advised) to call schedule function while holding spinlock on same core. spin_lock_irqsave(); schedule(); spin_lock_irqrestore(); however if you have debugging options turned on like CONFIG_DEBUG_SPINLOCK, you may likely get kernel warning for 'scheduling in atomic context'. Then what can happen if this core is allowed to switched to new process? Consider the case where new process as well tries to aquire same spin_lock() which new process can not aquire and start spinning for the lock for ever :). Likewise, other cores will also get locked down. However stil you can detect softlockup through NMI watchdog. Sorry if I am building up the confusion here. But as Dave Hylands initially mentioned, there will be no timer interrupt. So shouldn't the NMI watchdog get triggered then? No interrupts - system freeze - NMI Wdt reboot. In my opinion(uninformed ) NMI watchdog will be triggered only in case where you are holding a spinlock.It will not be triggered just because timer interrupts are disabled due to holding a spinlock. No, what I meant is - we have masked all the interrupts before holding the spinlock (and not even getting the timer interrupts) so it's as good as system freeze. And we should trigger the NMI watchdog, isn't it? -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
RE: spin_lock and scheduler confusion
Hi, -Original Message- From: kernelnewbies-boun...@kernelnewbies.org [mailto:kernelnewbies- boun...@kernelnewbies.org] On Behalf Of Dave Hylands Sent: Friday, January 07, 2011 10:59 AM To: Viral Mehta Cc: kernelnewbies@kernelnewbies.org Subject: Re: spin_lock and scheduler confusion Hi Viral, On Wed, Jan 5, 2011 at 2:23 PM, Viral Mehta viral.me...@lntinfotech.com wrote: Hi , I need your help to solve below confusion. [...] Note that you can't sleep while you hold a spinlock. You're not allowed to perform any type of blocking operations. If you're holding the spinlock for any significant length of time, then you're using the wrong design. spin_lock_irqrestore(); 3. One of the CPU core tries to execute this code and so acquires the lock. 4. Now, second core is also goes to execute same piece of code and so will [...] Not while it's holding the spinlock or waiting for the spinlock. Ever if timeslice is over for the current task ? The time tick interrupt is what determines when the timeslice is over. Since you have interrupts disabled, the timer interrupt can't happen. What if scheduler code is running on CPU core-3 and sees that timeslice for task running on CPU core-2 has expired ? Each core only considers the timeslices for its own core. I guess timeslice expire case is not as same as preemption. Or may be I am terribly wrong. You shouldn't be holding a spinlock for periods of time approaching the length of a timeslice. The timer interrupt is what determines the end of a timeslice. No timer interrupt, no end of a timeslice. Preemption is also triggered by the timer interrupt, or by releasing a resource that a higher priority task is waiting for. May be my understanding is incorrect, but wouldn't we hit the NMI watchdog here(assuming we are running on x86/x86_64)? We have a system lockup for long time. http://lxr.linux.no/#linux+v2.6.37/Documentation/nmi_watchdog.txt Could someone please clarify? Dave Hylands -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: functions about dump backtrace function names in mips arch
On Mon, 2011-01-03 at 22:32 +0800, loody wrote: hi all: 2011/1/3 Sowmya Sridharan sowmya.sridha...@tcs.com: Hi, I was able to check it in 2.6.36 version of kernel, and it is defined in traps.c. http://lxr.linux.no/linux+v2.6.36/arch/mips/kernel/traps.c#L205 dump_stack() calls show_backtrace function which had been show_trace in the earlier kernel versions. [...] [...] Regards, Sowmya thanks for your kind help, that is what I want. previously, I only see the address instead of function name, but after I select CONFIG_KALLSYMS as Y, I can see the function names also. BTW, what is the mechanism that kernel take to find out the function name? Enabling the config option, it allows to build the symbol table for kernel. It uses /proc/kallsyms. Below links could help: http://tldp.org/HOWTO/Module-HOWTO/x627.html http://fixunix.com/kernel/134739-proc-kallsyms-symbol-size.html Regards, miloody -- Thanks, Nilesh ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies