Re: printk and kernel log

2013-06-25 Thread Valdis . Kletnieks
On Tue, 25 Jun 2013 12:04:08 +0300, Kevin Wilson said: Hi, You are right, thanks! disabling CONFIG_PRINTK_TIME prevented this timestamps. I believe they should have provide some sysfs entry for this, sorry they did not do so Well actually, there's a boot-time cmdline parameter:

Re: File system query

2013-06-25 Thread Valdis . Kletnieks
On Tue, 25 Jun 2013 09:56:43 +0300, Alexandru Juncu said: On 23 June 2013 17:18, Dibyayan Chakraborty dib.cool...@gmail.com wrote: Hi, I came by a really weird macro code in linux/jbd.h which is BUFFER_TRACE(bh,info) do{} while(0). Please explain the necessity of this. I'm not

Re: Filesystem and files getting corrupted

2013-06-25 Thread Valdis . Kletnieks
On Tue, 25 Jun 2013 12:28:15 +0200, meccoma...@gmail.com said: I'm really newbie and I don't know if this may help at all, but I googled corruption of the file system debug and found http://linux.die.net/man/8/debugfs That won't help you debug a filesystem - debugfs is *itself* a

Re: some questions/oddities regarding exclusive wait queues

2013-06-21 Thread Valdis . Kletnieks
On Fri, 21 Jun 2013 17:54:04 -0400, Robert P. J. Day said: * The core wakeup function. Non-exclusive wakeups (nr_exclusive == 0) just * wake everything up. If it's an exclusive wakeup (nr_exclusive == small +ve * number) then we wake all the non-exclusive tasks and one exclusive task.

Re: Fwd: dump utility[sorry for last spam, it was tab+enter]

2013-05-28 Thread Valdis . Kletnieks
On Tue, 28 May 2013 10:25:09 +0530, jack rule said: I have to implement a dump utility which can dump the physical memory just before the crash/(crash +reboot). if anybody have worked with it pls share any info/structure as i din't find anything yet on google. Why spend time

Re: mss for tcp segment

2013-05-28 Thread Valdis . Kletnieks
On Tue, 28 May 2013 10:44:08 +0530, Varun Sharma said: What is the value of mss for tcp segment. It depends, among other things, on the MTU of your interface, the amount of memory you have for buffers, the amount of memory at the other end, and a few other things. Did you try googling for 'TCP

Re: about ssh

2013-05-28 Thread Valdis . Kletnieks
On Tue, 28 May 2013 12:47:51 +0530, Varun Sharma said: I want to know how two independent ssh session use same port for communication .At what level difference is come. Hint - a TCP connection is defined by a *4*-tuple of: (local IP, local port, remote IP, remote port). pgpKMETwooNDA.pgp

Re: hi Why is can't find a register in class

2013-05-27 Thread Valdis . Kletnieks
On Mon, 27 May 2013 15:51:26 +0800, lx said: When I make it, the error messages is: *namei.c:35: error: can't find a register in class *This is why? * Possibility 1: You screwed up the constrains on your asm and didn't leave the compiler any way to allocate CPU registers.. I havent had

Re: building a kernel from a mounted partition

2013-05-24 Thread Valdis . Kletnieks
On Fri, 24 May 2013 11:05:57 +0300, Andy Johnson said: Hello, I have a dual boot machine, Ubuntu/Fedora. I have a kernel tree on the fedora partition. Now, I had build a kernel on the Fedora partition successfully. I did **not** change anything in the tree, and then When I boot into

Re: Bootloader sequence with time prefix

2013-05-20 Thread Valdis . Kletnieks
On Mon, 20 May 2013 12:37:25 +0530, Dhyan said: Is there any uboot config option in to print boot sequence with time prefixes similar to kernel option CONFIG_PRINTK ? I think you meant CONFIG_PRINTK_TIME there - and if that kernel option is set, all your printks will show up with that, even

Re: Bootloader sequence with time prefix

2013-05-20 Thread Valdis . Kletnieks
On Mon, 20 May 2013 13:55:25 +0530, Dhyan said: Thank you for your quick reply, but what i need is *time in bootloader print output*. Kernel i already enabled and i am getting the time, That will require fixing your bootloader, which may be more than slightly interesting, as there's usually no

Re: Bootloader sequence with time prefix

2013-05-20 Thread Valdis . Kletnieks
On Mon, 20 May 2013 15:07:33 +0530, Dhyan said: I was working on to measure boottime for bootime optimization. The bootloader is probably not where you're going to find places to optimize. It's got two jobs to do - load the kernel and load the initrd. And it's usually pretty optimized to do

Re: Mapping of ZONE_HIGHMEM in kernel address space in 32bit x86

2013-05-14 Thread Valdis . Kletnieks
On Tue, 14 May 2013 11:15:35 +0530, Paul Davies C said: It is an arbitrary question that popped in my mind. However, I came to know that the constraints I stated in the previous mail is only restricted to x86 only.Now besides my first questions , I have one more question, Why x86 only? It's

Re: how do i read a block

2013-05-14 Thread Valdis . Kletnieks
On Tue, 14 May 2013 12:05:32 +0530, shampavman said: But why does a simple read not turn out 1 block for me? So explain to us why you think a read of 4096 bytes is reading something other than 1 4K block? pgpSyX0_YYYeT.pgp Description: PGP signature

Re: Mapping of ZONE_HIGHMEM in kernel address space in 32bit x86

2013-05-13 Thread Valdis . Kletnieks
On Mon, 13 May 2013 14:11:22 -0500, Sergio Andr said: 2. When user applications allocates memory, the kernel must allocate virtual memory and physical memory, right? Wrong. If userspace allocates (say) 15M of memory, the kernel has every right to overcommit and not actually allocate either

Re: Kernel routine to lock all of the pages of a particular VMA.

2013-05-09 Thread Valdis . Kletnieks
On Thu, 09 May 2013 22:25:54 +0530, Buland Kumar Singh said: Is there a kernel routine ( not a system call ) that a kernel module can call to lock all of the pages of a particular VMA of a user process that is using the driver ? What are you trying to accomplish here? And why isn't using

Re: read PCI memory and config spyce through /dev/mem

2013-05-06 Thread Valdis . Kletnieks
On Mon, 06 May 2013 14:44:03 -, Warlich, Christof said: $ dd if=/dev/mem bs=1 count=1024 skip=4150263808 dd: reading `/dev/mem': Bad address 0+0 records in 0+0 records out 0 bytes (0 B) copied, 6.6658e-05 s, 0.0 kB/s The kernel config help says that _PCI_ memory access is even

Re: hello and wiki edit

2013-04-30 Thread Valdis . Kletnieks
On Tue, 30 Apr 2013 21:17:44 +1000, Sven Dowideit said: I was browsing around and noticed that the wiki mentions the oftc #kernelnewbies group, which doesn't appear to be active at the moment. Assuming I'm correct, I'd like to update things like that - could I be added to the editor's list?

Re: oops in a kernel module

2013-04-28 Thread Valdis . Kletnieks
On Sat, 27 Apr 2013 19:34:00 +0300, Kevin Wilson said: Hello, static int __init init_zeromib(void) This is your init routine... { int ret = 0; printk(in %s\n,__func__); Missing KERN_DEBUG or similar here. This can cause it to fail to appear in dmesg output, causing much confusion.

Re: Building kernel modules with debuginfo and printing line numbers in kernel oops message / coredump

2013-04-19 Thread Valdis . Kletnieks
On Fri, 19 Apr 2013 23:55:49 +0530, Sankar P said: myfunctionname +0x2507 +5679 That function is too honking big and needs to be refactored. :) pgp5Kg1q_h7vQ.pgp Description: PGP signature ___ Kernelnewbies mailing list

Re: So I want to get some kernel routine called....

2013-04-16 Thread Valdis . Kletnieks
On Tue, 16 Apr 2013 16:33:17 -0700, Arlie Stephens said: I have some kernel routine I'd like to get called, with the decision to call it made in user space. The proper answer here is *highly* dependent on exactly what this routine has to do once it's called. Can you explain the problem the

Re: net_device: limit rate ot tx packets

2013-04-14 Thread Valdis . Kletnieks
On Sun, 14 Apr 2013 10:09:54 +0200, mic...@michaelblizek.twilightparadox.com said: This is not what I meant. When the qdisc has a size of say 256KB and the socket memory is, say 128kb, the socket memory limit will be reached before the qdisc limit and the socket will sleep. But when the

Re: How will Linux community support the coming Intel new chip Bay Trail?

2013-04-11 Thread Valdis . Kletnieks
On Thu, 11 Apr 2013 23:08:21 +0800, Peter Xu said: Hi, all, It seems that Intel will publish a nice chip called Bay Trail (or plus, I don't quick sure, which is for smartphones/tablets, also some lower ends of laptops in the future). It was said publically that Intel will support Linux

Re: simple question about the function memcmp in kernel

2013-04-07 Thread Valdis . Kletnieks
On Mon, 08 Apr 2013 08:57:01 +0800, Ben Wu said: int memcmp(const void *cs, const void *ct, size_t count) { I want to know why it use the temp pointer su1, su2? why it doesn't directly use the cs and ct pointer? This is a C 101 question, not a kernel question. But anyhow.. They're

Re: simple question about the function memcmp in kernel

2013-04-07 Thread Valdis . Kletnieks
On Mon, 08 Apr 2013 05:56:29 +0400, Max Filippov said: const is the the object they point to, not the pointers themselves (that would be void * const cs). memcmp compares bytes at which cs and ct point, but these are void pointers, and the expression res = *cs - *ct is thus meaningless.

Re: Method to calculate user space thread size

2013-04-03 Thread Valdis . Kletnieks
On Wed, 03 Apr 2013 14:03:40 +0530, naveen yadav said: I have code written, and I cannot modify. I want to fix user stack size for all threads in glibc, 'man ulimit'? pgp5JyPP87h7J.pgp Description: PGP signature ___ Kernelnewbies mailing list

Re: NMIs, Locks, linked lists, barriers, and rculists, oh my!

2013-04-03 Thread Valdis . Kletnieks
On Wed, 03 Apr 2013 19:08:45 -0700, Arlie Stephens said: - I've got a linked list, with entries occassionally added from normal contexts. - Entries are never deleted from the list. This is already busted - you *will* eventually OOM the system this way. This would be simple, except that the

Re: Reading linux boot args

2013-04-02 Thread Valdis . Kletnieks
On Tue, 02 Apr 2013 12:12:09 +0900, manty kuma said: Is there any way i could read the reason for reboot. I want to read it so that i can get the reason that is stored. like 0xABADBABE is watchdog 0xCODEDEAD is panic. Etc.. Please suggest an alternative approach. See the 'pstore'

Re: cgroup.procs versus tasks (cgroups)

2013-04-02 Thread Valdis . Kletnieks
On Tue, 02 Apr 2013 16:46:24 +0300, Kevin Wilson said: Hi, Thanks a lot Vlad. This explains it. - Does anybody know of a ps command (or a filter to ps command) which will display only multithreaded processes (list processes by TGID) ? (I know now about the option of displaying

Re: Online migration of arbitrary filesystems, possible?

2013-04-02 Thread Valdis . Kletnieks
On Mon, 01 Apr 2013 17:50:43 -0300, Daniel Hilst said: Any reason you can't just 'rsync /source-fs /dest-fs'? because I can't use dest-fs while rsynching Sure you can. You just have to remember to pay attention to race conditions - if you create foo/bar.dat on the dest and then rsync wants

Re: what does it use two !!

2013-04-01 Thread Valdis . Kletnieks
On Mon, 01 Apr 2013 15:10:46 +0800, Ben Wu said: 1 I found some placeuse two !!, what's means     if(button-gpio != INVALID_GPIO)         state = !!((gpio_get_value(button-gpio) ? 1 : 0) ^ button-active_low);     else Gaah. That line of code fell out of the ugly tree and hit every branch on

Re: why not choose another way to define the _IOC_xxxMASK related to the ioctl

2013-03-30 Thread Valdis . Kletnieks
On Sat, 30 Mar 2013 18:01:32 +0800, RS said: Now I think this will spend more time than the kernel code when executed. Have you actually examined the generated code on several popular architectures to see what gcc actually does? (hint - many things can constant-folded at compile time. So if

Re: Creating mkfs for my custom filesystem

2013-03-29 Thread Valdis . Kletnieks
On Fri, 29 Mar 2013 15:44:49 +0530, Sankar P said: I have decided on a simple layout for my filesystem where the first block will be the super block and will contain the version information etc. The second block will contain the list of inodes. Third block onwards will be data blocks. Each

Re: Online migration of arbitrary filesystems, possible?

2013-03-29 Thread Valdis . Kletnieks
On Fri, 29 Mar 2013 17:09:14 -0300, Daniel Hilst said: The idea is, mount both filesystems together, and make write/read operations go on this way Read operations: 1. See if data is already on dest fs, 2. If is then read data and bright back to caller (lets call this cold read)

Re: initramfs_list

2013-03-27 Thread Valdis . Kletnieks
On Wed, 27 Mar 2013 20:38:54 +0800, ishare said: I am do some test on kernel 2.6.0 and encountering an problem about initramfs . I find my initramfs generated without a initramfs_list file ,which describes the list of files that will be created into the initramfs file . such as

Re: cap on writeback?

2013-03-25 Thread Valdis . Kletnieks
On Mon, 25 Mar 2013 16:33:48 -0700, Raymond Jennings said: Just curious, is there a cap on how much data can be in writeback at the same time? I'm asking because I have over a gigabyte of data in dirty, but during flush, only about 60k or so is in writeback at any one time. Only a gigabyte?

Re: cap on writeback?

2013-03-25 Thread Valdis . Kletnieks
On Mon, 25 Mar 2013 17:23:40 -0700, Raymond Jennings said: Is there some sort of mechanism that throttles the size of the writeback pool? There's a lot of tunables in /proc/sys/vm - everything from drop_caches to swappiness to vfs_cache_pressure. Note that they all interact in mystical and

Re: initramfs.cpio

2013-03-24 Thread Valdis . Kletnieks
On Sun, 24 Mar 2013 16:27:27 +0800, ishare said: Hi : I find that my initramfs_data.cpio generated by gcc does not contain init files ,which should be executed by terminal initialization. My initramfs_data.cpio only contains these : /dev /dev/consol /root . where to

Re: optimization in kernel compile

2013-03-22 Thread Valdis . Kletnieks
On Fri, 22 Mar 2013 13:41:25 +0800, ishare said: Is it needed or must to compile fs and driver with -O2 option when compiling kernel ? It's not strictly mandatory to use -O2 (for a while, -Os was the default). There are a few places that for correctness, you *cannot* use -O0. For instance,

Re: optimization in kernel compile

2013-03-22 Thread Valdis . Kletnieks
On Fri, 22 Mar 2013 22:32:40 +0800, ishare said: are a few places that for correctness, you *cannot* use -O0. For instance, a few places where we use builtin_return_address() inside an inline (-O0 won't inline so builtin_return_address() ends up returning a pointer to a function when we

Re: optimization in kernel compile

2013-03-22 Thread Valdis . Kletnieks
On Fri, 22 Mar 2013 10:52:56 -0400, valdis.kletni...@vt.edu said: No debug information is stripped by -O2. Debug information isn't emitted if you don't compile with -g. At one time, long ago (quite possibly literally before you were born for some of the younger readers on the list), gcc was

Re: BFQ: simple elevator

2013-03-22 Thread Valdis . Kletnieks
On Fri, 22 Mar 2013 13:53:45 -0700, Raymond Jennings said: The first heap would be synchronous requests such as reads and syncs that someone in userspace is blocking on. The second is background I/O like writeback and readahead. The same distinction that CFQ completely makes. Again, this

Re: BFQ: simple elevator

2013-03-21 Thread Valdis . Kletnieks
On Wed, 20 Mar 2013 16:37:41 -0700, Raymond Jennings said: Hmm...Maybe a hybrid approach that allows a finite number of reverse seeks, or as I suspect deadline does a finite delay before abandoning the close stuff to march to the boonies. Maybe. Maybe not. It's going to depend on the

Re: kernel build error

2013-03-20 Thread Valdis . Kletnieks
On Wed, 20 Mar 2013 00:07:57 -0700, Kumar amit mehta said: I forgot that 'uname -m' will return me the kernel version and _not_ the CPU architecture. The CPU on my machine seem to be 64 bit (/proc/cpuinfo|grep flags shows 'lm'). So my understanding is that I've a 32 bit kernel running on a

Re: BFQ: simple elevator

2013-03-20 Thread Valdis . Kletnieks
On Thu, 21 Mar 2013 02:24:23 +0700, Mulyadi Santosa said: pardon me for any possible sillyness, but what happen if there are incoming I/O operation at very nearby sectors (or perhaps at the same sector?)? I suppose, the elevator will prioritize them first over the rest? (i.e starving will

Re: BFQ: simple elevator

2013-03-20 Thread Valdis . Kletnieks
On Wed, 20 Mar 2013 14:41:31 -0700, Raymond Jennings said: Suppose you have requests at sectors 1, 4, 5, and 6 You dispatch sectors 1, 4, and 5, leaving the head parked at 5 and the direction as ascending. But suddenly, just before you get a chance to dispatch for sector 6, sector 4 gets

Re: Linux elevators (Re: BFQ: simple elevator)

2013-03-20 Thread Valdis . Kletnieks
On Wed, 20 Mar 2013 16:05:09 -0700, Arlie Stephens said: The ongoing thread reminds me of a simple question I've had since I first read about linux' mutiple I/O schedulers. Why is the choice of I/O scheduler global to the whole kernel, rather than per-device or similar? They aren't global to

Re: Memory allocations in linux for processes

2013-03-19 Thread Valdis . Kletnieks
On Tue, 19 Mar 2013 20:41:55 +0530, Niroj Pokhrel said: #includestdio.h int main() { while(1) { } return 0; } I don't understand where does mmap or malloc come in to play in this code. Unless you linked it statically, a lot of stuff happens before you ever get to main()

Re: signals handling: kill() successful, but nothing delivered

2013-03-18 Thread Valdis . Kletnieks
On Mon, 18 Mar 2013 06:50:25 +0100, mic...@michaelblizek.twilightparadox.com said: Hi! On 06:52 Fri 08 Mar , mic...@michaelblizek.twilightparadox.com wrote: ./a.out `ps a|grep wget|grep -v grep To save the double grep, you can do something like this: ps a | grep '[w]get' | ...

Re: programme header

2013-03-18 Thread Valdis . Kletnieks
On Tue, 19 Mar 2013 09:38:49 +0800, ishare said: I am linking my kernel by a link script. its contens is as below: I think it will work ,but ld report that No enough room for programme header,what is the reason? what should I do ? The first thing you do is ask yourself why you're using

Re: programme header

2013-03-18 Thread Valdis . Kletnieks
On Tue, 19 Mar 2013 12:44:36 +0800, ishare said: because I need to generate a .so for sysenter used And that solves what problem for you, exactly? Consider that most architectures that use sysenter manage to do so without having to worry about a .so for it (or if they really do need one,

Re: block mailing list?

2013-03-15 Thread Valdis . Kletnieks
On Fri, 15 Mar 2013 06:22:14 -0700, Raymond Jennings said: Is there a kernel list dedicated to discussion of block devices? What's to discuss? There probably isn't enough ongoing traffic to support a separate mailing list (we got too many of them as it is :) MAINTAINERS says: BLOCK LAYER M:

Re: User space memory

2013-03-12 Thread Valdis . Kletnieks
On Tue, 12 Mar 2013 18:38:05 +0530, Prabhu nath said: On Sun, Mar 10, 2013 at 11:30 PM, Christoph Seitz c.se...@tu-bs.de wrote: I use a char device for reading and writing from/to a pcie dma card. Especially the read function makes me some headache. The user allocates some memory with

Re: User space memory

2013-03-12 Thread Valdis . Kletnieks
On Tue, 12 Mar 2013 15:03:53 +0100, Christoph Seitz said: I found out, if I use the force flag with get_user_pages, the pages get faulted, but there has to be a nicer way than using the force flag. Why does there have to be a nicer way? Maybe you already got the nice way. (Hint - why does

Re: Userspace interception of locally valid memory location

2013-03-10 Thread Valdis . Kletnieks
On Sun, 10 Mar 2013 19:27:52 +0530, harish badrinath said: Is it possible to intercept (both read and write) a locally valid address of a process and replace it with our own values (it is for a transparent distributed shared memory project). Go look at how gdb traces variables.

Re: Userspace interception of locally valid memory location

2013-03-10 Thread Valdis . Kletnieks
On Sun, 10 Mar 2013 19:27:52 +0530, harish badrinath said: Hello, Is it possible to intercept (both read and write) a locally valid address of a process and replace it with our own values (it is for a transparent distributed shared memory project). (Damn, hit send too soon) Go look at how

Re: 64bit MMIO access

2013-03-10 Thread Valdis . Kletnieks
On Sun, 10 Mar 2013 20:35:37 +0100, Jagath Weerasinghe said: readq and writeq do the job. Please double-check how those are implemented on your architecture. I seem to remember that on some systems, readq and writeq may not be atomic and may become two bus cycles. And some hardware cares about

Re: 64bit MMIO access

2013-03-10 Thread Valdis . Kletnieks
On Sun, 10 Mar 2013 20:35:37 +0100, Jagath Weerasinghe said: Hi, readq and writeq do the job. (hit send too soon) Also, the read/write [bwlq] functions refer to the width of the *data*, not the address pgpRFJDCHascC.pgp Description: PGP signature

Re: Disabling interrupts and masking interrupts

2013-03-07 Thread Valdis . Kletnieks
On Thu, 07 Mar 2013 17:17:19 +0200, Kevin Wilson said: Does this mean that once you are disabling interrupts, these interrupts are lost ? even later, when we will enable interrupts, the interrupts from the past that should have been created (but interrupts were disabled at that time

Re: Disabling interrupts and masking interrupts

2013-03-07 Thread Valdis . Kletnieks
On Thu, 07 Mar 2013 09:28:58 -0800, Dave Hylands said: In my experience, edges triggered interrupts are always latched by the HW when they arrive. If another edge comes along between the initial edge and the time that the interrupt is cleared, then this second edge is lost. The fact that an

Re: Query on skb buffer

2013-03-06 Thread Valdis . Kletnieks
On Wed, 06 Mar 2013 10:39:13 -0800, Kumar amit mehta said: Now, if alloc_skb(4096, GFP_KERNEL) is the routine that gets called to allocate the kernel buffer then, how does the kernel manages such prospective memory allocation failures and how kernel manages large packet requests from the

Re: Several unrelated beginner questions.

2013-03-06 Thread Valdis . Kletnieks
On Wed, 06 Mar 2013 18:19:09 -0500, Konstantin Kowalski said: 1.) Currently, I am reading 2 books about Linux kernel: Linux Device Drivers (3rd edition) and Linux Kernel Development (3rd edition). I like both books and I am learning a lot from them. I heard that both of this books are

Re: zap_low_mappings

2013-03-06 Thread Valdis . Kletnieks
On Thu, 07 Mar 2013 10:33:18 +0800, ishare said: kernel halts because the page mapping has been modified by zap_low_mappings why we should do zap_low_mappings in init procedure ? this will disorder the page mapping. You might want to get yourself an up to date kernel, as the code

Re: zap_low_mappings

2013-03-06 Thread Valdis . Kletnieks
On Thu, 07 Mar 2013 11:43:43 +0800, ishare said: set_pgd(swapper_pg_dir+i, __pgd(0)); If I have not define CONFIG_X86_PAE ,then the low mem will be invalided all . And what makes you think that call invalidates *all* the page mappings? pgpwj47K1DPrA.pgp Description: PGP

Re: Module compilation error

2013-03-04 Thread Valdis . Kletnieks
On Tue, 05 Mar 2013 09:07:51 +0700, Mulyadi Santosa said: On Tue, Mar 5, 2013 at 7:48 AM, Pietro Paolini pulsarpie...@aol.com wrote: echo 2 Run 'make oldconfig make prepare' on kernel src try the suggested above step. IIRC, those commands will do things like preparing the

Re: pthread_lock

2013-03-04 Thread Valdis . Kletnieks
On Tue, 05 Mar 2013 11:02:45 +0530, Mandeep Sandhu said: next schedule. I think the waiting threads (processes) will moved from the wait queue to the run queue from where they will be scheduled to run. For bonus points, read source code and/or comments and figure out what Linux does to

Re: how to trace tcp protocol stack ?

2013-03-03 Thread Valdis . Kletnieks
On Sun, 03 Mar 2013 12:13:51 +0800, ishare said: Is there mothod to look up the call stack of tcp protocol solution? ftrace and related functionality. Note that there is a difference between look up the call stack and trace the flow of execution. Consider the following code: int a (

Re: Why vmlinux.bin are changed from raw image to elf for x86 ?

2013-03-02 Thread Valdis . Kletnieks
On Sat, 02 Mar 2013 16:36:43 +0800, Jacky said: The -O binary is removed. And I don't find any changelog. A quick course on researching kernel development history... Step 1: 'git blame arch/x86/boot/compressed/Maekfile' That gives us the line: 099e1377 (Ian Campbell2008-02-13

Re: [ARM_LINUX] ioremap() allowing to map system memory...

2013-03-01 Thread Valdis . Kletnieks
On Fri, 01 Mar 2013 16:48:12 +0530, sandeep kumar said: Don't you think it should throw panic()while calling the ioremap() itself. Because this sounds like a serious violation... As you noted, it does give you a warning. That's a kernel design philosophy - to reserve the panic() and BUG()

Re: [filesystem] struct of m_inode

2013-03-01 Thread Valdis . Kletnieks
On Sat, 02 Mar 2013 10:28:26 +0800, lx said: if (block = 7+512+512*512) because the i_zone[9]. But the question is why the i_zone[7] can repesent 512 , and i_zone[8] can repesent 512*512 ? Sngle, double, and triple indirect blocks... http://en.wikipedia.org/wiki/Inode_pointer_structure

Re: How to measure the RAM read/write performance

2013-02-27 Thread Valdis . Kletnieks
On Wed, 27 Feb 2013 15:38:00 +0530, sandeep kumar said: In development phase of the board, we are trying to measure RAM performance gain while changing type of the RAM. The standard benchmark tools are giving us the Cache performance only. So we want to try some method to measure RAM

Re: general_protection result to die

2013-02-26 Thread Valdis . Kletnieks
On Tue, 26 Feb 2013 06:23:34 +0800, horseriver said: does general_protection trap necessarily result to die ? Think for a bit - what other actions can reasonably be taken? You hit a GPF, it's obvious that the variables you're working on have been corrupted, so automatically continuing is

Re: How to measure the RAM read/write performance

2013-02-26 Thread Valdis . Kletnieks
On Tue, 26 Feb 2013 22:35:35 +0700, Mulyadi Santosa said: let' see what if you do read and write pattern, in certain order so that it will be invalidated by the L1/L2/L3 cache everytime? AFAIK, one thing for sure, reading data from sequentially and re-read them will make end up reading

Re: Kernel freeze when writing e1000 driver

2013-02-26 Thread Valdis . Kletnieks
On Tue, 26 Feb 2013 11:19:18 -0500, Phani Vadrevu said: I am writing a network driver for the e1000 card. While doing the receive part, I saw that the kernel freezes whenever it reaches the netif_rx(skb) call. I was able to reproduce the same error when using a bare bones driver where I hard

Re: atomic operations

2013-02-24 Thread Valdis . Kletnieks
On Sun, 24 Feb 2013 11:50:14 +0100, richard -rw- weinberger said: On Sun, Feb 24, 2013 at 10:42 AM, Shraddha Kamat sh200...@gmail.com wrote: what is the relation between atomic operations and memory alignment ? I read from UTLK that an unaligned memory access is not atomic please

Re: barrier()

2013-02-24 Thread Valdis . Kletnieks
On Mon, 25 Feb 2013 12:26:06 +0530, Shraddha Kamat said: #define barrier() asm volatile( ::: memory) What exactly volatile( ::: memory) doing here ? You probably should read Documentation/memory-barriers.txt in your kernel source tree, and let us know if you still have questions after that...

Re: Sending an IP packet

2013-02-22 Thread Valdis . Kletnieks
On Fri, 22 Feb 2013 14:36:17 +0200, Adel Qodmani said: My question is quite simple, I have an sk_buff that I want to transmit, the sk_buff is an ICMP message and so far, I've built the headers and set up everything. Others have given some details on how. A better question is why. Sending an

Re: Sending an IP packet

2013-02-22 Thread Valdis . Kletnieks
On Fri, 22 Feb 2013 17:15:35 +0200, you said: I am trying to implement a new protocol that we've designed which works on top of the IP layer, so I am using ICMP messages to carry control information for the protocol. Why using ICMP, it seemed natural since our protocol is a Network-layer

Re: unsubscibe

2013-02-21 Thread Valdis . Kletnieks
On Thu, 21 Feb 2013 15:57:46 +0530, Sandeep Sonawane said: Please remove my email id sandeep.sonaw...@gmail.com from this DL. If your mail software supported RFC2369 mail headers, you would have seen the following on every posting to the list: List-id: Learn about the Linux kernel

Re: SIGKILL and a sleeping kernel module

2013-02-19 Thread Valdis . Kletnieks
On Tue, 19 Feb 2013 10:37:28 +0200, Kevin Wilson said: Hi all, I am trying to send a SIGKILL to a kernel module which is sleeping. I added a printk after the sleep command. Sending a SIGLKILL (by kill -9 SIGLKILL pidOfKernelThread) does **not** yield the message from printk(calling

Re: cpu_relax(), rep: nop, and PAUSE

2013-02-19 Thread Valdis . Kletnieks
On Wed, 20 Feb 2013 01:58:17 +0700, Mulyadi Santosa said: On Tue, Feb 19, 2013 at 7:20 PM, David Shwatrz dshwa...@gmail.com wrote: Hi, kernel newbies, We have: #define cpu_relax() asm volatile(rep; nop) in arch/x86/boot/boot.h. Why don't we use the PAUSE assembler instruction

Re: Tracing SIGKILL, is that possible?

2013-02-18 Thread Valdis . Kletnieks
On Mon, 18 Feb 2013 15:46:58 -0300, Daniel. said: Is there a way to track signals, specially SIGKILL. I would like to know if some process dies because reach some resource limit, because an OMM error or something likewise.. Depends on where you want the tracking to go. But your first thing to

Re: Linux Kernel

2013-02-18 Thread Valdis . Kletnieks
On Tue, 19 Feb 2013 10:50:26 +0530, kapil agrawal said: How the linux kernel runs in the system after spawning the init and mounting the root FS. Does it run as some background process ? No. You probably want to get some basic knowledge about operating systems in general.

Re: Linux Kernel

2013-02-18 Thread Valdis . Kletnieks
On Tue, 19 Feb 2013 12:01:55 +0530, kapil agrawal said: Do you mean process with PID 0 is the one, which runs in the background and serves the request from userland and goes to cpu_idle() if nothing to run. No. Large parts of the kernel run in kernel mode, but using the 'struct task' of the

Re: process 0 (swapper)

2013-02-16 Thread Valdis . Kletnieks
On Sat, 16 Feb 2013 18:48:52 +0200, Kevin Wilson said: ~0U is not 0 but -1; -ENOCAFFEINE. You'd think that after having done kernel-level C programming since the days of SunOS 3.1.5 and BSD 4.2 I'd k know better. ;) pgpBxhyWvlc2R.pgp Description: PGP signature

Re: using prefetch

2013-02-15 Thread Valdis . Kletnieks
On Fri, 15 Feb 2013 12:16:02 +0200, Kevin Wilson said: Is the prefetch operation synchronous ? I mean, after calling it, are we gauranteed that the variable is indeed in the cache ? No, the whole *point* is that it's asynchronous. You issue the prefetch several lines of code before you need

Re: start address of the code segment of the program on x86-64

2013-02-14 Thread Valdis . Kletnieks
On Thu, 14 Feb 2013 15:33:48 +0200, Kevin Wilson said: Hi, 0x08048000 address is the start address of the code segment of a program in on x86-32. More likely, it was the start address of *one particular run* of the program. In most kernel configurations, there's something called Address

Re: MAX limit of file descriptor

2013-02-11 Thread Valdis . Kletnieks
On Sat, 09 Feb 2013 13:10:47 +0800, horseriver said: In one process ,what is the max number of opening file descriptor ? Can it be set to infinite ? In network programing ,what is the essential for the maximum of connections dealed per second In general, you'll find that

Re: MAX limit of file descriptor

2013-02-11 Thread Valdis . Kletnieks
On Mon, 11 Feb 2013 06:07:38 +0800, horseriver said: Actually , my question comes from network performance ,I want to know ,in per second ,the maximum of tcp connections that can be dealed with by my server. That will be *highly* dependent on what your server code does with each

Re: hd controller

2013-02-07 Thread Valdis . Kletnieks
On Thu, 07 Feb 2013 16:19:33 +0800, horseriver said: hi:) I am curious about how hd controller work . When user am reaing/writing hd ,it was implemented by sending command to hd controller's special port.Then ,how does the controller know a new command has received? In this

Re: pr_info not printing message in /var/log/messages

2013-02-07 Thread Valdis . Kletnieks
On Thu, 07 Feb 2013 23:20:27 +0530, anish kumar said: Other insteresting standard logs managed by syslog are /var/log/auth.log, /var/log/mail.log. Other interesting *common* logs, as shipped pre-configured by some distros. They are hardly a standard (unless the definitions of these managed to

Re: hd controller

2013-02-07 Thread Valdis . Kletnieks
On Fri, 08 Feb 2013 07:48:39 +0800, Peter Teoh said: So the drivers just literally concatenate these command into a string and send it over to the device. The reason that good disk drivers are hard to write is because it isn't *just* literally concatenating the commands - it also has to do

Re: hard disk dirver

2013-02-06 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 12:30:37 +0800, horseriver said: root = ? You mean the aasignment at grub command line ? For instance, the grub entry for the kernel I'm running right now: title 3.8.0-rc6-next-20130206 kernel /vmlinuz-3.8.0-rc6-next-20130206 ro

Re: hard disk dirver

2013-02-06 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 13:21:17 +0800, horseriver said: At booting stage,kernel need to detect the hard device before mount it, does this work need pci's surport? That depends. Is the controller for the hard drive a PCI-based controller? On most x86-based boxes, it is (and I'm not sure

Re: Creating scheduler

2013-02-06 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 23:19:26 +0530, jeshkumar...@gmail.com said: Can anyone suggest a good tutorial to create our own scheduler ? Doing an I/O scheduler is pretty trivial, and there's a number of examples in-tree already to look at. If you mean a CPU scheduler, the major reason why there's no

Re: hard disk dirver

2013-02-06 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 13:20:13 -0500, Greg Freemyer said: Most new MB's have a SATA controller directly on the MB connected directly to either the North or South bridge (I don't know which). I don't think any PCI is support needed to talk to the boot disk. Yes, but said SATA controller and

Re: Creating scheduler

2013-02-06 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 20:40:47 +0100, Jonathan Neuschäfer said: I'm sorry to ask, but don't you rather mean watts than watts per second? There may indeed be a second order time component involved - for instance, a cooling system that can handle 10 watts continuously, 20 watts for up to 30

Re: open image file

2013-02-05 Thread Valdis . Kletnieks
On Tue, 05 Feb 2013 04:59:42 +0800, horseriver said: hi: It is not a cpio archive , so that command can not work . its file system type is tmpfs. Umm. No. It's not tmpfs. tmpfs is a specific ram/swap based filesystem - basically, take enough 4K pages for the size= parameter and do it in

Re: Process exit codes

2013-02-05 Thread Valdis . Kletnieks
On Tue, 05 Feb 2013 14:07:37 +0100, Grzegorz Dwornicki said: I guess that there may be a better API that why this thread was created in first place. My project goal is to make process checkpoints like cryopid had. This is for my thesis and will be GPL for everyone after my graduaction. I am

Re: pr_info not printing message in /var/log/messages

2013-02-05 Thread Valdis . Kletnieks
On Wed, 06 Feb 2013 04:43:20 +0800, Jimmy Pan said: in fact, i've been always wondering what is the relationship between dmesg and /var/log/message. they diverse a lot... What ends up in /var/log/message is some subset (possibly 100%, possibly 0%) of what's in dmesg. Where your syslog daemon

<    5   6   7   8   9   10   11   >