Why the niceness is not always taken into account ?
Hello, I have some questions about nice and programs scheduling. My machines have an 8 cores CPU. I am using an CPU intensive test, using OpenMP and running on the 8 cores for the experiments. When I am running my test it is taking around 12s. If I am starting at the same time two instances of this test it takes 24s which is totally fine and expected. I wanted to prioritize one instance of the test with nice. To do this, I am applying a niceness of -20 to privileged one, and setting a niceness of 20 to slow down the second one. This is usually working well. The privileged one with run around 12s (so, at full speed) and the other one 24s (- paused for 12s and running the 12 last seconds at full speed). My problem is that in some cases it is not working at all. It works fine if I am running both programs in the same instance of the terminal, or from a script (so, same instance of interpreter). But this is not working if I am running the instances in separate SSH session. When I say it is not working, both instances will take 24s to run and the CPU usage is just shared between the tasks. More precisely : 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 will not be taken into account. The CPU will be shared equally between both instances even if htop is showing a niceness of 19 / -20 for the low priority program and the privileged program respectively. (For information, if I am running my program throught SSH using a script, and even by running the commands directly throught the SSH terminal it will work as expected. So, the cause is not on SSH.) Can you explain me, why in such case, the niceness is not taken into account ? Can you tell me how I can workaround this problem to effectively set niceness and get it respected by the system ? Best regards, ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Why the niceness is not always taken into account ?
On 2013-04-16 10:35:05 (+0200), Alexandre Laurent alexandre.laur...@uvsq.fr wrote: My problem is that in some cases it is not working at all. It works fine if I am running both programs in the same instance of the terminal, or from a script (so, same instance of interpreter). But this is not working if I am running the instances in separate SSH session. When I say it is not working, both instances will take 24s to run and the CPU usage is just shared between the tasks. Is it possible that you're running systemd or something else which is configuring cgroups? Regards, Kristof ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
SNORT/SURICATA LEARNing
Dear All, I want to learn the snort and suricata whats the best way to learn it. I have read the architecture. Now i want to go into the code Whats the best way plz tell Thanks ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: SNORT/SURICATA LEARNing
Robert Clove cloverob...@gmail.com wrote: Dear All, I want to learn the snort and suricata whats the best way to learn it. I have read the architecture. Now i want to go into the code Whats the best way plz tell Thanks The first thing i would do is find a relevant mailing list. This isn't it. Fyi: when you find it, please send me a private message. I too would like to learn suricata. I'm trying to package it for opensuse right now. Step one for me is to get libprelude added to the distro. That is under review and should happen this week. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: SNORT/SURICATA LEARNing
On Tue, Apr 16, 2013 at 12:17 PM, Robert Clove cloverob...@gmail.comwrote: Dear All, I want to learn the snort and suricata whats the best way to learn it. See there are ample tutorials out there if you want to configure snort for particular box. If you want to get into learning about how to hack snort, code and snort mailing list should be your friend. As I understand correctly in order for snort to be any useful you need to have a lot of useful configuration files for different rules. You may start looking at these files. I have read the architecture. Now i want to go into the code Whats the best way plz tell Thanks ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- Thank you Warm Regards Anuz ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
YAFFS2 not part of Linux Kernel
Hello all, reading docs and browsing internet I read that YAFFS2 is not merged in the Linux Kernel and that we should add it as a patch, the date is not write on that documents and I just tried to search YAFFS2 on the latest linux kernel source without relevant results. Then after a look on the www.yaffs.net I discovered a tutorial for merge it and I am sure, yes is not in the kernel tree. On the website they said is under the GPL license and I don't understand, why is not merged in the Linux Kernel directly ? It's just a curiosity, thanks in advance. Pietro. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Why the niceness is not always taken into account ?
On the computer where I am testing, I have nothing related to cgroups. Here a 'ps aux' in case I am missing something. USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 10652 836 ? Ss avril09 0:03 init [2] root 2 0.0 0.0 0 0 ? S avril09 0:00 [kthreadd] root 3 0.0 0.0 0 0 ? S avril09 0:07 [ksoftirqd/0] root 5 0.0 0.0 0 0 ? S avril09 0:00 [kworker/0:0H] root 7 0.0 0.0 0 0 ? S avril09 0:00 [kworker/u:0H] root 8 0.0 0.0 0 0 ? S avril09 0:00 [migration/0] root 9 0.0 0.0 0 0 ? S avril09 0:00 [rcu_bh] root 10 0.0 0.0 0 0 ? S avril09 1:05 [rcu_sched] root 11 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/0] root 12 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/1] root 13 0.0 0.0 0 0 ? S avril09 0:15 [ksoftirqd/1] root 14 0.0 0.0 0 0 ? S avril09 0:00 [migration/1] root 16 0.0 0.0 0 0 ? S avril09 0:00 [kworker/1:0H] root 17 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/2] root 18 0.0 0.0 0 0 ? S avril09 0:17 [ksoftirqd/2] root 19 0.0 0.0 0 0 ? S avril09 0:00 [migration/2] root 21 0.0 0.0 0 0 ? S avril09 0:00 [kworker/2:0H] root 22 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/3] root 23 0.0 0.0 0 0 ? S avril09 0:17 [ksoftirqd/3] root 24 0.0 0.0 0 0 ? S avril09 0:00 [migration/3] root 26 0.0 0.0 0 0 ? S avril09 0:00 [kworker/3:0H] root 27 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/4] root 28 0.0 0.0 0 0 ? S avril09 0:00 [ksoftirqd/4] root 29 0.0 0.0 0 0 ? S avril09 0:00 [migration/4] root 30 0.0 0.0 0 0 ? S avril09 0:00 [kworker/4:0] root 31 0.0 0.0 0 0 ? S avril09 0:00 [kworker/4:0H] root 32 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/5] root 33 0.0 0.0 0 0 ? S avril09 0:08 [ksoftirqd/5] root 34 0.0 0.0 0 0 ? S avril09 0:00 [migration/5] root 36 0.0 0.0 0 0 ? S avril09 0:00 [kworker/5:0H] root 37 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/6] root 38 0.0 0.0 0 0 ? S avril09 0:10 [ksoftirqd/6] root 39 0.0 0.0 0 0 ? S avril09 0:00 [migration/6] root 40 0.0 0.0 0 0 ? S avril09 0:00 [kworker/6:0] root 41 0.0 0.0 0 0 ? S avril09 0:00 [kworker/6:0H] root 42 0.0 0.0 0 0 ? S avril09 0:01 [watchdog/7] root 43 0.0 0.0 0 0 ? S avril09 0:08 [ksoftirqd/7] root 44 0.0 0.0 0 0 ? S avril09 0:00 [migration/7] root 45 0.0 0.0 0 0 ? S avril09 0:00 [kworker/7:0] root 46 0.0 0.0 0 0 ? S avril09 0:00 [kworker/7:0H] root 47 0.0 0.0 0 0 ? S avril09 0:00 [cpuset] root 48 0.0 0.0 0 0 ? S avril09 0:00 [khelper] root 49 0.0 0.0 0 0 ? S avril09 0:00 [kdevtmpfs] root 50 0.0 0.0 0 0 ? S avril09 0:00 [netns] root 51 0.0 0.0 0 0 ? S avril09 0:00 [bdi-default] root 52 0.0 0.0 0 0 ? S avril09 0:00 [kintegrityd] root 53 0.0 0.0 0 0 ? S avril09 0:00 [kblockd] root 54 0.0 0.0 0 0 ? S avril09 0:31 [kworker/0:1] root 55 0.0 0.0 0 0 ? S avril09 0:00 [khungtaskd] root 56 0.0 0.0 0 0 ? S avril09 0:00 [kswapd0] root 57 0.0 0.0 0 0 ? SN avril09 0:00 [ksmd] root 58 0.0 0.0 0 0 ? SN avril09 0:04 [khugepaged] root 59 0.0 0.0 0 0 ? S avril09 0:00 [fsnotify_mark] root 60 0.0 0.0 0 0 ? S avril09 0:00 [crypto] root 64 0.0 0.0 0 0 ? S avril09 0:00 [deferwq] root 66 0.0 0.0 0 0 ? S avril09 0:00 [kworker/0:2] root 67 0.0 0.0 0 0 ? S avril09 0:08 [kworker/5:1] root 131 0.0 0.0 0 0 ? S avril09 0:00 [khubd] root 202 0.0 0.0 0 0 ? S avril09 0:00 [ata_sff] root 206 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_0] root 207 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_1] root 208 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_2] root 209 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_3] root 210 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_4] root 211 0.0 0.0 0 0 ? S avril09 0:00 [scsi_eh_5] root 214 0.0 0.0 0 0 ? S avril09 0:00 [kworker/u:4] root 215 0.0 0.0 0 0 ? S avril09 0:00 [kworker/u:5] root 218 0.0 0.0 0 0 ? S avril09 0:12 [kworker/1:1] root 219 0.0 0.0 0 0 ? S avril09 0:08 [kworker/7:1] root 226 0.0 0.0 0 0 ? S avril09 0:13 [kworker/3:1] root 230 0.0 0.0 0 0 ? S avril09 0:00 [kworker/5:2] root 232 0.0 0.0 0 0 ? S avril09 0:06 [kworker/0:1H] root 241 0.0 0.0 0 0 ? S avril09 0:00 [kworker/5:1H] root 247 0.0 0.0 0 0 ? S avril09 0:00 [kworker/4:1H] root 251 0.0 0.0 0 0 ? S avril09 0:00 [kworker/1:1H] root 252 0.0 0.0 0 0 ? S avril09 0:00 [kworker/6:1H] root 253 0.0 0.0 0 0 ? S avril09 0:00 [kworker/2:1] root 254 0.0 0.0 0 0 ? S avril09 0:08 [kjournald] root 258 0.0 0.0 0 0 ? S avril09 0:08 [kworker/6:1] root 267 0.0 0.0 0 0 ? S avril09 0:00 [kworker/3:1H] root 337 0.0 0.0 0 0 ? S avril09 0:00 [kworker/2:1H] root 394 0.0 0.0 0 0 ? S avril09 0:00 [kworker/7:1H] root 402 0.0 0.0 21836 1784 ? Ss avril09 0:00 udevd --daemon root 583 0.0 0.0 0 0 ? S avril09 0:00 [kpsmoused] root 584 0.0 0.0 0 0 ? S avril09 0:00 [kworker/1:2] root 691 0.0 0.0 0 0 ? S avril09 0:06 [kworker/4:2] root 746 0.0 0.0 0 0 ? S avril09 0:00 [kvm-irqfd-clean] root 748 0.0 0.0 0 0 ? S avril09 0:00 [hd-audio0] root 772 0.0 0.0 96268 4048 ? Ss 17:28 0:00 sshd: lalexandre [priv] 10084 777 0.0 0.0 96268 1892 ? S 17:28 0:00 sshd: lalexandre@pts/1 10084 778 0.0 0.0 24008 4748 pts/1 Ss+ 17:28 0:00 -bash root 953 0.0 0.0 0 0 ? S avril09 0:05 [flush-8:0] root 1037 0.0 0.0 0 0 ? S 17:33 0:00 [flush-0:22] root 1043 0.0 0.0 18900 1280 pts/4 R+ 17:35 0:00 ps aux root 1687
Re: Why the niceness is not always taken into account ?
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 will not be taken into account. The CPU will be shared equally between both instances even if htop is showing a niceness of 19 / -20 for the low priority program and the privileged program respectively. Can you check whether you have CONFIG_SCHED_AUTOGROUP enabled? If it is enabled, try running the test again with this option turned off. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: YAFFS2 not part of Linux Kernel
Pietro Paolini pulsarpie...@aol.com wrote: Hello all, reading docs and browsing internet I read that YAFFS2 is not merged in the Linux Kernel and that we should add it as a patch, the date is not write on that documents and I just tried to search YAFFS2 on the latest linux kernel source without relevant results. Then after a look on the www.yaffs.net I discovered a tutorial for merge it and I am sure, yes is not in the kernel tree. On the website they said is under the GPL license and I don't understand, why is not merged in the Linux Kernel directly ? It's just a curiosity, thanks in advance. Pietro. I don't know specifics, but when drbd decided to submit their code to the kernel for inclusion it took a tremendous amount of work on their part to get it into technically acceptable shape. It's not like all they do is ask you if it's gpl. They did deep into the code and make sure it meets the kernel devs standards. Greg -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Why the niceness is not always taken into account ?
On 2013-04-16 17:38:50 (+0200), Alexandre Laurent alexandre.laur...@uvsq.fr wrote: On the computer where I am testing, I have nothing related to cgroups. Here a 'ps aux' in case I am missing something. cgroups wouldn't actually show up in the process list. Check mount to see if anyone mounts an fs of type 'cgroup'. It's perhaps even more likely that it's related to SCHED_AUTOGROUP as Michi suggested. -- Kristof ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Module needs to lookup its own symbols at runtime.
I have a kernel loadable module that needs to be able to lookup its own symbols at runtime. I.e., given a string that represents the name of the symbol, the module needs to find the address. Preferably, this should work for symbols that are not marked 'EXPORT_SYMBOL' as well as those that are. I used to be able to do this by calling parse_symbol() that's part of kdb, but now my module is required to run without depending on kdb. Is there an API that provides this functionality? Otherwise, any hints about how to proceed would be helpful. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Module needs to lookup its own symbols at runtime.
user space tool to look up symbol name is very easier than kernel module, just grep in /proc/kallsyms will be sufficient On Tue, Apr 16, 2013 at 11:26 PM, Neil Baylis neil.bay...@gmail.com wrote: I have a kernel loadable module that needs to be able to lookup its own symbols at runtime. I.e., given a string that represents the name of the symbol, the module needs to find the address. Preferably, this should work for symbols that are not marked 'EXPORT_SYMBOL' as well as those that are. I used to be able to do this by calling parse_symbol() that's part of kdb, but now my module is required to run without depending on kdb. Is there an API that provides this functionality? Otherwise, any hints about how to proceed would be helpful. ___ 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: Invitation to connect on LinkedIn
Is it normal that somebody uses this kernelnewbies e-mail as its private address?@Deepak, if you're reading this, please could you change settings in linkedin? 17.04.2013, 00:10, "Kumar Sukhani via LinkedIn" mem...@linkedin.com: Deepak, Kumar Sukhani wants to connect with you on LinkedIn. Kumar SukhaniSystem Developer at Dreamz group View Profile » Accept You are receiving Invitation emails. Unsubscribe. This email was intended for Deepak Shah (Software Engineer at Barracuda Networks). Learn why we included this. © 2013, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA ,___Kernelnewbies mailing listKernelnewbies@kernelnewbies.orghttp://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
So I want to get some kernel routine called....
Hi Folks, It's that BSD engineer again, trying to do something in linux and unable to see the _linux_ way to do it ;-) I have some kernel routine I'd like to get called, with the decision to call it made in user space. Obviously I could do this by making it into a full blown system call, but that's pretty much never the right answer, except for a quick hack. In FreeBSD, I'd make it into a sysctl, and have my user space script do something like sysctl debug.call_my_hack=1 I'd then define call_my_hack to to be the type of sysctl that calls a procedure, using a convenient macro, and I'd be done. In linux I've determined that the /proc/sys interface is the preferred way to access sysctl's, but that even that is possibly deprecated in favour of sysfs. Documentation on implementing sysctl's is conspicuous by its absence, and much of what I've found applies only to the deprecated interface. In particular, the strategy routine appears designed for my purpose - but is never called if you come in to the kernel with read/write to /proc/sys/whatever. Probably I can get the effect I want by (ab)using the proc_handler function pointer - but is that what I should be doing? As for sysfs, it's tightly tied to the physical device hierarchy. I can't even find how one is supposed to deal with pseudo-devices. There do however seem to be a few interesting things in /sys/kernel which clearly have nothing to do with the device hierarchy. Probably checking their implementation will teach me how to use this ... but not whether it's the right thing to do. For what it's worth, there is a pseudo-device driver involved, but no convenient /dev interface to issue ioctls on. (Probably calling it a pseudo-device exagerates its abilities.) As always, I'm looking primarily at 2.6.32, but want to write code that's good for the long haul, and potentially upstreamable. So, how would someone who thinks in linux go about doing this? Thanks for any enlightenment. -- Arlie (Arlie Stephens ar...@worldash.org) ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: YAFFS2 not part of Linux Kernel
Hi! On Die, 2013-04-16 at 17:23 +0200, Pietro Paolini wrote: [...] On the website they said is under the GPL license and I don't understand, why is not merged in the Linux Kernel directly ? You should ask the yaffs2 people about that as they are the only ones who can actually answer it . Bernd -- Bernd Petrovitsch Email : be...@petrovitsch.priv.at LUGA : http://www.luga.at ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: So I want to get some kernel routine called....
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 routine is trying to solve? Quite often, by the time you get to the i need to call a routine stage, you've stopped seeing the forest for the trees, and stepping back and looking at the actual problem to be solved rather than a proposed solution will provide insight. pgp6HRCIoBp_i.pgp Description: PGP signature ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Build error in linux-3.8.7
Hi, I am new to linux kernel buidling. I have download 3.8.7 latest (stable) kernel from https://www.kernel.org/. I want build kernel for X86_64. 1. make x86_64_defconfig (this created .config file) 2. make Make failed with below error, please help me in resolving this. CC kernel/power/user.o CC kernel/power/block_io.o CC kernel/power/poweroff.o LD kernel/power/built-in.o CC kernel/sched/core.o CC kernel/sched/clock.o CC kernel/sched/cputime.o CC kernel/sched/idle_task.o CC kernel/sched/fair.o kernel/sched/fair.c: In function `update_curr': kernel/sched/fair.c:428: sorry, unimplemented: inlining failed in call to 'account_cfs_rq_runtime': function body not available kernel/sched/fair.c:714: sorry, unimplemented: called from here make-3.79.1-p7[2]: *** [kernel/sched/fair.o] Error 1 make-3.79.1-p7[1]: *** [kernel/sched] Error 2 make-3.79.1-p7: *** [kernel] Error 2 bash-3.00$ pwd thanks Giri ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Invitation to connect on LinkedIn
On Tue, Apr 16, 2013 at 11:14 PM, rush deb...@irush.su wrote: Is it normal that somebody uses this kernelnewbies e-mail as its private address? I believe he answered YES for the linkedin proposal if it can send email to whole address book. @Deepak, if you're reading this, please could you change settings in linkedin? 17.04.2013, 00:10, Kumar Sukhani via LinkedIn mem...@linkedin.com: Deepak, Kumar Sukhani wants to connect with you on LinkedIn. Kumar Sukhani System Developer at Dreamz group View Profile » Accept You are receiving Invitation emails. Unsubscribe. This email was intended for Deepak Shah (Software Engineer at Barracuda Networks). Learn why we included this. © 2013, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA , ___ 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 -- Leon Romanovsky | Independent Linux Consultant www.leon.nu | l...@leon.nu ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies