Re: Why the niceness is not always taken into account ?

2013-04-16 Thread michi1
Hi! On 10:35 Tue 16 Apr , Alexandre Laurent wrote: ... > I am running the same test, but connecting twice on the remote machine > (one connection by test instance). I am using exactly the same commands > than during the others experiments. But, by using two SSH instances, > the > niceness wil

Re: net_device: limit rate ot tx packets

2013-04-14 Thread michi1
Hi! On 03:45 Sun 14 Apr , valdis.kletni...@vt.edu wrote: > On Sun, 14 Apr 2013 08:15:21 +0200, mic...@michaelblizek.twilightparadox.com > said: > > > It would be interesting to see what will happen if the qdisc is smaller than > > the socket memory... > > As long as the qdisc is able to sen

Re: net_device: limit rate ot tx packets

2013-04-13 Thread michi1
Hi! On 14:11 Sat 13 Apr , christian...@wwad.de wrote: > Hi All, > > can someone please explain me, how the kernel handles different > transfer rates of different net_devices? Or in other words: How does > the systemcall send() know, when to block? > > An example: > cat /dev/zero | pv | nc

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

2013-04-04 Thread michi1
Hi! On 14:03 Thu 04 Apr , Arlie Stephens wrote: ... > On Apr 04 2013, mic...@michaelblizek.twilightparadox.com wrote: ... > > On 19:08 Wed 03 Apr , Arlie Stephens wrote: ... > > > fix __list_add() so it updates pointers in the new entry before updating > > > pointers in its neighbours, > >

Re: Can anyone plz explain me the fields

2013-04-04 Thread michi1
Hi! On 17:38 Thu 04 Apr , Tarun Batra wrote: > Can anyone plz explain me the fields > > > skb = kmem_cache_alloc(skbuff_head_cache, gfp_mask & ~_ _GFP_DMA); > ... ... ... > size = SKB_DATA_ALIGN(size); size of data buffer (the bytes you send over the wire not the overhead of everyt

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

2013-04-04 Thread michi1
Hi! On 19:08 Wed 03 Apr , Arlie Stephens wrote: ... > Put another way, my problem is that I want the readers to be able to > do their thing regardless of the state of the lock that serializes > writers. > > In all cases, writers are protected from each other with a mutex. > > Here are some

Re: Related to Network packet in kernel

2013-04-04 Thread michi1
Hi! On 17:29 Thu 04 Apr , Tarun Batra wrote: > Hi All, > > > I was reading "Understanding linux networking Internal" book and the pdf > "Network packet capture in Linux kernelspace" on the link > https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CDQQFjAA&url=http%3A%2F%2

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

2013-03-17 Thread michi1
Hi! On 06:52 Fri 08 Mar , mic...@michaelblizek.twilightparadox.com wrote: >./a.out `ps a|grep wget|grep -v grep|sed "s/^[^0-9]*\([0-9]*\).*$/\1/"` The command above returned the strace pid. Fixed version: ./a.out `ps a|grep wget|grep -v grep|grep -v strace|sed "s/^[^0-9]*\([0-9]*\).*

signals handling: kill() successful, but nothing delivered

2013-03-07 Thread michi1
Hi! I am trying to test for signal handling race conditions (specifically, I suspect the kernel side of connect() does interesting things if the server response arrives while the program executes a signal handler) and want to flood a program with lots of signals. So I have run this: --- #!/bin/ba

Re: Why would some process swap in place of reclaiming free(cached) memory

2013-02-20 Thread michi1
Hi! On 20:31 Wed 20 Feb , Soham Chakraborty wrote: > Hi all, > > I posted this question in linux-mm list as well but it didn't spawn much > interest. So, I am putting the same question here also. Would love if > someone can put some traction. > > The question is salivating and simple. When w

Re: using prefetch

2013-02-15 Thread michi1
Hi! On 12:16 Fri 15 Feb , Kevin Wilson wrote: ... > AFAIK, what prefetch does is get a variable from memory and put it in > cache (L2 cache I believe). Yes, this is true. See: http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Other-Builtins.html I am not so sure about the cache level it is fetched

Re: MAX limit of file descriptor

2013-02-11 Thread michi1
Hi! On 14:24 Mon 11 Feb , valdis.kletni...@vt.edu wrote: > On Sat, 09 Feb 2013 13:10:47 +0800, horseriver said: ... > >In network programing ,what is the essential for the maximum of > > connections > >dealed per second > ... > So the *real* question > becomes "how many times per sec

Re: MAX limit of file descriptor

2013-02-10 Thread michi1
Hi! On 22:47 Sun 10 Feb , Peter Teoh wrote: > On Sun, Feb 10, 2013 at 8:29 PM, > wrote: > > > Hi! > > > > On 13:10 Sat 09 Feb , horseriver wrote: > > > hi:) > > > > > >In one process ,what is the max number of opening file descriptor ? > > > > Type "ulimit -a" in your shell. On my sys

Re: MAX limit of file descriptor

2013-02-10 Thread michi1
Hi! On 13:10 Sat 09 Feb , horseriver wrote: > hi:) > >In one process ,what is the max number of opening file descriptor ? Type "ulimit -a" in your shell. On my system (debian) the default is 1024. >Can it be set to infinite ? Maybe, but at least it can be set very high. >In ne

Re: I/O event notification mechanism - select() or epoll() ?

2012-09-27 Thread michi1
Hi! On 17:19 Wed 26 Sep , Rahul Bedarkar wrote: > Hi, > > I have to capture kernel udev events through libudev. One of API > provides asynchronous events by reading on file descriptor. I found > that there two ways to do that. > > 1) select call > 2) epoll > > I also found that epoll is sma

Re: Facing trouble in creating a packet in kernel space

2012-09-25 Thread michi1
Hi! On 16:28 Tue 25 Sep , Rifat Rahman wrote: > Hello there, > > I need to mangle rtp packets in kernel space. So far I am new in kernel > module programming. I am trying to implement a module for netfilter hooks. > For the first time as exercise, I am trying to write smaller modules. Let > m

Re: Books for protocol development

2012-09-25 Thread michi1
Hi! On 09:12 Tue 25 Sep , V.Ravikumar wrote: > On Mon, Sep 24, 2012 at 9:03 PM, > wrote: > > > Hi! > > > > On 17:02 Mon 24 Sep , V.Ravikumar wrote: > > > Hello all , > > > > > > Could some body please suggest any books/links for Linux networking > > > protocol development. > > > Protocol

Re: Books for protocol development

2012-09-24 Thread michi1
Hi! On 17:02 Mon 24 Sep , V.Ravikumar wrote: > Hello all , > > Could some body please suggest any books/links for Linux networking > protocol development. > Protocol development at L2/L3 layers. There is a book called "The Linux Networking Architecture: Design and Implementation of Network P

Re: Is it possible to use a local drive to cache an NFS share

2012-09-03 Thread michi1
Hi! On 22:27 Mon 03 Sep , Mulyadi Santosa wrote: > Hi :) > > On Mon, Sep 3, 2012 at 8:00 PM, Graeme Russ wrote: > > Hi All, > > > > I am mounting /home over NFS which is great, but it really kills compile > > times. So I have a local HDD which I have copied all my source code over > > from w

Re: Is it possible to use a local drive to cache an NFS share

2012-09-03 Thread michi1
Hi! On 23:00 Mon 03 Sep , Graeme Russ wrote: > Hi All, > > I am mounting /home over NFS which is great, but it really kills compile > times. So I have a local HDD which I have copied all my source code over > from which I do my coding and compiling. > > What I would love to do is use the loc

Re: Kernel Memory

2012-06-21 Thread michi1
Hi! On 17:57 Thu 21 Jun , Vijay Chauhan wrote: > Hello, > > I am newbie. > It has been said "kernel memory is not pageable" > What does it mean? There is no concept of kernel virtual address? > > Any simple explanation will help me to udnerstand. The right term is actually "kernel memory is

Re: [RFC]confusions about 'struct' define

2012-05-31 Thread michi1
Hi! On 00:50 Thu 31 May , harryxiyou wrote: ... > I have never seen struct define like > > "struct device; > struct device_private; > struct device_driver; > [...] > struct device_node; > struct iommu_ops;" This basically says that these structs exist and are defined somewhere. You need this

Re: linker error: section __modver vma 0x6028c000 overlaps previous

2012-05-10 Thread michi1
Hi! The bug seems fixed somewhere in mainline between 3.1.0-rc1 and 3.4-rc6. -Michi ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Re: linker error: section __modver vma 0x6028c000 overlaps previous

2012-05-09 Thread michi1
Hi! On 11:53 Thu 10 May , Mulyadi Santosa wrote: > Hi again... :) > > On Thu, May 10, 2012 at 1:49 AM, > wrote: > > Hi! > > > > On 00:19 Thu 10 May     , Mulyadi Santosa wrote: > >> Hi... > >> > >> On Wed, May 9, 2012 at 11:41 AM, > >> wrote: > >> > /usr/bin/ld: .tmp_vmlinux2: section __mod

Re: linker error: section __modver vma 0x6028c000 overlaps previous

2012-05-09 Thread michi1
Hi! On 00:19 Thu 10 May , Mulyadi Santosa wrote: > Hi... > > On Wed, May 9, 2012 at 11:41 AM, > wrote: > > /usr/bin/ld: .tmp_vmlinux2: section __modver vma 0x6028c000 overlaps > > previous sections > >  KSYM    .tmp_kallsyms2.S > >  AS      .tmp_kallsyms2.o > >  LD      vmlinux > > /usr/bin

linker error: section __modver vma 0x6028c000 overlaps previous

2012-05-08 Thread michi1
Hi! I am facing a weird problem: $ ARCH=um make linux make[1]: `arch/um/sys-x86_64/user-offsets.s' is up to date. CHK include/linux/version.h CHK include/generated/utsrelease.h CALLscripts/checksyscalls.sh CHK include/generated/compile.h QUOTE arch/um/kernel/config.tmp

Re: Kernel latency for handling the Network traffic

2012-05-03 Thread michi1
Hi! On 09:47 Thu 03 May , Abu Rasheda wrote: > On Thu, May 3, 2012 at 6:54 AM, > wrote: > > Hi! > > > > On 16:33 Thu 03 May     , Suresh Kumar Subramanian wrote: > >> Hi, > >> > >> I am building the router based on linux kernel. > >> > >> The hardware details are below, > >> 2 - 64 bit quad c

Re: Kernel latency for handling the Network traffic

2012-05-03 Thread michi1
Hi! On 16:33 Thu 03 May , Suresh Kumar Subramanian wrote: > Hi, > > I am building the router based on linux kernel. > > The hardware details are below, > 2 - 64 bit quad core processor (3Ghz core). > RAM- 24GB RAM. > PCI express slot- connected with Quad Port 100Mbps Ethernet adapter -2. (s

Re: immutable wiki?

2012-05-02 Thread michi1
Hi! On 09:29 Tue 01 May , Bill Traynor wrote: > I have an Editor account for the kernelnewbies.org wiki, but all pages > are currently immutable. Was the wiki made read-only at some point? You must be on http://kernelnewbies.org/EditorsGroup to make changes. This was made for spam procection

Re: What is the difference between a kernel BUG and a kernel Oops?

2012-03-03 Thread michi1
Hi! On 17:38 Sat 03 Mar , hujun_hotmail wrote: > I want to know what is the difference between a kernel BUG and a kernel Oops > , who can tell me? A BUG() is something like an assertion. Basically this means that a developer thought that a certain situation should never be happen and if it d

Re: How to measure performance inside Kernel?

2012-02-10 Thread michi1
Hi! On 22:22 Fri 10 Feb , Peter Senna Tschudin wrote: ... > I'm measuring the running time of that portion of code 512 times. Then > calculate the geometrical mean of results. See one output example: > > Original_code:, > 514,110,92,104,107,101,101, ... > The geometrical mean of the values is

Re: How to measure performance inside Kernel?

2012-02-10 Thread michi1
Hi! On 19:47 Fri 10 Feb , Peter Senna Tschudin wrote: ... > #include > > getnstimeofday (ts_start); /*stopwatch start*/ ... > getnstimeofday (ts_end); /*stopwatch stop*/ > > diff = timespec_sub(end, begin); > > printk ("%lu,", diff.tv_nsec ); > > Am I doing anything wrong? Can mysterious

Re: How to measure performance inside Kernel?

2012-02-09 Thread michi1
Hi! On 10:58 Thu 09 Feb , Peter Senna Tschudin wrote: ... > But I want to repeat the tests on specific portion of code, not on > entire application. Is there a safe way of do something like: > > start_bench ( ?? ); /* start measurement */ > > buf_ptr_end = q->bufs[q->num_buffers]; > > for (

Re: Check Interface Status

2011-12-30 Thread michi1
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

struct net_device locking

2011-12-29 Thread michi1
Hi! I could not see any locking being done with "struct net_device" at all even tough there are many read+write accesses to non-atomic variables. For example: Changing mac addresses: user space netlink socket call to set IFLA_ADDRESS http://lxr.linux.no/linux+v3.1.6/net/core/rtnetlink.c#L1521 htt

Re: Check Interface Status

2011-12-29 Thread michi1
Hi! On 09:53 Thu 29 Dec , 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. If you want to c

Re: which context can't use queue_work() function?

2011-12-03 Thread michi1
Hi! On 21:56 Sat 03 Dec , onlyfever wrote: > Hi, > I have a question about work queue. > I use queue_work() function in my TTY driver's write function > (ch_tty_write()). > The TTY driver works fine,but when this driver is called from > ppp_write() function system would crash. > > static

Re: Generic I/O

2011-11-15 Thread michi1
Hi! On 11:40 Tue 15 Nov , Kai Meyer wrote: > On 11/15/2011 11:13 AM, mic...@michaelblizek.twilightparadox.com wrote: ... > > You might want to take a look at wait queues (the kernel equivalent to > > pthread > > "condidions"). Basically you instead of calling msleep(), you call > > wait_event

Re: Generic I/O

2011-11-15 Thread michi1
Hi! On 12:15 Mon 14 Nov , Kai Meyer wrote: ... > My > caller function has an atomic_t value that I set equal to the number of > bios I want to submit. Then I pass a pointer to that atomic_t around to > each of the bios which decrement it in the endio function for that bio. > > Then the ca

Re: Query on Rx Frame processing

2011-10-15 Thread michi1
Hi! On 19:45 Sat 15 Oct , amit mehta wrote: ... > Now in step 4 above, driver passes this packet to the > network layer by calling netif_receive_skb() which may return > NET_RX_DROP (packet was dropped), but most > (I checked some of the network driver code) of the network > drivers do not do thi

Re: Problem with a UDP server implements

2011-10-15 Thread michi1
Hi! On 16:29 Sat 15 Oct , tao jiang wrote: > michi: > > 1. > Is that to create two sockets > and one bind to 10.0.0.1 the other bind to 10.0.0.2 > then use epoll wait these two sockets ? Yes, exactly. > 2. > Is there any way to find out the turple like TCP > then the UDP server can reply wi

Re: Problem with a UDP server implements

2011-10-14 Thread michi1
Hi! On 01:51 Sat 15 Oct , jiangtao.jit wrote: > Hi: > > I'm writing a UDP server and meet a problem > the UDP server program is run on a box with single card but has multi ip: > likeeth010.0.0.1 > eth0:1 10.0.0.2 > eth0:2 11.0.0.1 > > I bind the

Re: Questions about User Mode Linux

2011-10-13 Thread michi1
Hi! On 20:47 Thu 13 Oct , Richard Weinberger wrote: > Am 13.10.2011 20:10, schrieb mic...@michaelblizek.twilightparadox.com: > > After migrating from i386 to x86_64, my uml started to segfault in weird > > ways. > > What exactly is the problem? > Without any details nobody can and will help you.

Re: Questions about User Mode Linux

2011-10-13 Thread michi1
Hi! After migrating from i386 to x86_64, my uml started to segfault in weird ways. In the end, I figured that "make clean/mrproper/distclean" does not really clean up properly. I had to use "ARCH=um make distclean". The command "make distclean" did not remove these files: arch/um/include/shared/k

Re: Questions about User Mode Linux

2011-10-12 Thread michi1
Hi! On 17:25 Wed 12 Oct , mic...@michaelblizek.twilightparadox.com wrote: ... > 3) Sometimes UML is a real pain. When I upgrade my testing kernel, I usually >have to spend some time searching the internet for fixes. I do not remember >this error, tough. You can find my current (3.0) ke

Re: Questions about User Mode Linux

2011-10-12 Thread michi1
Hi! On 19:15 Wed 12 Oct , jiangtao.jit wrote: > Hi: > > Need help with UML issue > > 1.is User Mode Linux still supported? I think so > 2.where can I find the latest Docs and guidelines? I usually refer to http://user-mode-linux.sourceforge.net/old/index.html . It probably is not really t

Re: When is to preempt safe?

2011-10-09 Thread michi1
Hi! On 19:52 Sun 09 Oct , Parmenides wrote: > 2011/10/9 Daniel Baluta : > > On Sat, Oct 8, 2011 at 7:19 PM, Parmenides > > wrote: > > > > Well, I think that if task B has higher priority than task A, then A would > > never have the chance to release the lock. > > > > Hmm...! Does that mean

Re: When is to preempt safe?

2011-10-09 Thread michi1
Hi! On 23:53 Sat 08 Oct , Dave Hylands wrote: > Hi Michi, > > On Sat, Oct 8, 2011 at 11:29 PM, Michael Blizek > wrote: ... > > Disabling interrupts actually disables preemption as well. Preemption is > > triggered by a timer interrupt, which cannot arrive in this case. Spinlocks > > can be a