[08:40] <fairuz> which process has pid = 0?
[08:40] <RAOF> itih
[08:40] <RAOF> fairuz: init.
[08:41] <fairuz> RAOF: ty
[08:41] <RAOF> (Which, in Ubuntu, will be upstart)
[08:42] <fairuz> RAOF: does this process will run with the kernel?
[08:42] <fairuz> RAOF: or just at the beginning
[08:43] <RAOF> I'm not sure what you mean?
[08:43] <fairuz> RAOF: when I do ps -A, I see that there is no pid 0, init is at pid 1
[08:44] <RAOF> Ah.  Then maybe I meant “there is no pid 0, but init is at pid 1” :{
[08:44] <RAOF> Ah.  Then maybe I meant “there is no pid 0, but init is at pid 1” :)
[08:44] <fairuz> so pid 0 doesnt exist at all?
[08:45] <RAOF> Now that I think of it, ‘0’ is probably used as a flag value for pid.
[08:45] <Krunch> init is 1
[08:46] <fairuz> yes, I see that init is pid 1
[08:46] <fairuz> i just wondering, since I saw a code that set the affinity of the processor
[08:46] <fairuz> and it passes 0 for the pid argument
[08:47] <fairuz> And I just wonder which process does have pid 0
[08:47] <Krunch> for syscalls, passing 0 as a pid usually means "myself"
[08:47] <fairuz> ah ok
[08:47] <fairuz> that make sense
[08:48] <Krunch> "If pid is zero, then the calling process is used." -- SCHED_SETAFFINITY(2)
[08:49] <fairuz> Krunch: RAOF: ok all make sense now. Thanks
[08:51] <fairuz> if we set sched_setaffinity to current process
[08:52] <fairuz> that doesnt mean that if we start another process after that, it receive the same affinity?
[08:52] <fairuz> it just affects the process that call the setaffinity, right?
[08:54] <Krunch> read the friendly manual
[08:54] <Krunch> A child created via fork(2) inherits its parent’s CPU affinity mask.
[08:56] <fairuz> Krunch: yes i read it. Thanks. But my concern is if I launch a process A to start a hardware counter, then start the process B, and recall process A to stop the counter
[08:56] <fairuz> so if I set the affinity in process A, it does not affect process B?
[08:57] <fairuz> (process B is not a child of process A), consider its a random test case
[08:57] <Krunch> i don't see why it would
[08:57] <fairuz> ok
[08:57] <Krunch> but just try
[09:29] <fairuz> does mmap in user space do the same thing as ioremap in kernel space?
[10:09] <apw> fairuz, nope
[10:10] <omry> hi, got a new HP Envy and I am seeing some issues. brighness control keys are not working, touch pad is not wokring correctly and I also not sure turbo boost is working as it should (I see scaling up to 1.73ghz instead of up to 2.93ghz).
[10:10] <fairuz> apw: ok. So is there a way to get a virt addr for a known phys addr in user space?
[10:11] <omry> I am currently on the stock 10.10 kernel (2.6.35)
[10:11] <omry> any recommendations?
[10:11] <Krunch> fairuz: i doubt there is an API for that
[10:12] <Krunch> fairuz: what you actually trying to do?
[10:12] <fairuz> Krunch: just trying to write to a register in userspace
[10:12] <fairuz> I want to avoid writing a device driver if possible
[10:13] <Krunch> have you looked at ptrace?
[10:15] <fairuz> Krunch: I dont think I get what you mean by using ptrace
[10:15] <Krunch> the ptrace() system calls allows you to observe and modify processes, there is a flag specifically to change the registers
[10:16] <Krunch> or you meant a hardware register or something?
[10:17] <Krunch> s/hardware/pci or otherwise not general purpose/
[10:17] <fairuz> yes i mean hardware registers, sorry.
[10:18] <Krunch> i doubt you can go and mess the hardware from userland without writing a device driver
[10:18] <Krunch> but there are some facilities like libpci
[10:18] <fairuz> Krunch: ok.
[10:19] <RAOF> You probably can go and mess with (at least PCI, probably more of) the hardware from userspace; X drivers used to be user-space, for example.
[10:21] <Krunch> well, in principle you can do pretty much anything you want from userspace by poking around /dev/kmem :)
[10:21] <fairuz> do you mean /dev/mem?
[10:21] <Krunch> either
[10:21] <Krunch> but don't do that
[10:22] <fairuz> it's dangerous i assume?
[10:22] <Krunch> it's tricky and it will break on every update
[10:22] <RAOF> What sort of hardware are you trying to prod, anyway?
[10:23] <Krunch> you can see an example of using libpci to change CPU MSR here http://timetobleed.com/enabling-bios-options-on-a-live-server-with-no-rebooting/
[10:23] <Krunch> that's a much saner approach 
[10:23] <Krunch> and i am confused, the MSR is not changed through libpci
[10:24] <Krunch> depend what you are trying to do exactly
[10:26] <fairuz> RAOF: it's PL310, a L2 cache controller for ARM
[10:28] <RAOF> Funky.  No PCI for you!
[10:29] <fairuz> RAOF: yes =)
[10:29] <RAOF> X did (and still does, I believe) also have userspace I2C drivers, which might be closer to what you're after.
[10:30] <fairuz> ok thanks
[10:30] <fairuz> If it's too complicated, I'll just write a device driver for that
[10:30] <fairuz> easier i guess
[10:58] <tgardner> apw, ba04c7c93bbcb48ce880cf75b6e9dffcd79d4c7b
[14:25] <pgraner> tgardner, http://www.linuxpromagazine.com/Online/News/Ubuntu-11.10-Named-Oneiric-Ocelot
[14:26]  * smb wished they would get back to attributes he does not need a dictionary for
[14:26] <JFo> I'll be referring to it as 'O'
[14:26] <JFo> smb :)
[14:29] <smb> Hm, ok something as dreamlike. Could be good or bad. :-P
[14:29] <sconklin> http://who-t.blogspot.com/2011/03/how-to-dos-developer.html
[14:35] <hallyn> Hi - bug 714335 was supposedly fixed in the -generic but not -server kernel.  Is that possible?  Or does rebuilding -server and -virtual kernels require a separate trigger?
[14:35] <ubot2> Launchpad bug 714335 in linux "KVM SMP Linux Guests Hang on AMD" [Medium,Confirmed] https://launchpad.net/bugs/714335
[14:38] <smb> hallyn, What makes you think that it should be fixed? IIRC that is one thing I had on my things to review still
[14:38] <hallyn> smb: just that the bug submitter said it was fixed :)
[14:39] <hallyn> smb: great, thanks I'll leave a comment to the effect that it's awaiting review
[14:40] <smb> hallyn, One never knows what exactly was fixed where. Yes, and I try to get back to that next thing today
[14:42] <smb> hallyn, I beleieve I started and was wondering about patch #1 which said something about moving a function but the patch looked like adding (probably because of the backport). And before I got to check against the upstream patch I must have been interrupted by something else
[14:43] <hallyn> smb: yeah the original commit did the same thing and i didn't want to rock the boat.  (it 'moved' a function without removing the original one :)  
[14:43] <hallyn> smb: thanks.  
[14:43] <smb> hallyn, Ah ok. :)
[18:11] <JFo> <-food
[18:20] <LLStarks> hi, i was wondering if bug 621265 could get some attention. its had a fix ready for over a month yet still hasn't been backported to maverick.
[18:20] <ubot2> Launchpad bug 621265 in linux "Slow Wireless Connection in Intel 3945abg" [High,Confirmed] https://launchpad.net/bugs/621265
[18:22]  * jjohansen looks
[18:24] <jjohansen> LLStarks: generally fixes like this wait on them moving into the upstream stable tree, of course the .35 tree is a bit different story
[18:27] <LLStarks> even usability issues?
[18:28] <LLStarks> how do i request an sru?
[18:31] <jjohansen> LLStarks: you can send a mail to the kernel team mailing list
[18:32] <smoser> smb, around ?
[19:33] <kamal> apw: natty 2.6.38-6.33 is FTBFS (due to toolchain breakage?):  https://launchpad.net/ubuntu/+source/linux/2.6.38-6.33/+buildjob/2306132
[19:41] <JFo> kamal, likely he is out with pgraner and the new folks since they are doing the 'new guy sprint'
[19:44] <kamal> JFo: yup, well apw will surely enjoy knowing that natty kernel is borked when he returns from whatever den of iniquity they're um... "sprinting" at.  ;-)
[19:56] <genux> lo. was wondering how to compile the new kernel on 11.04 ? what packages do you need, ? I have done apt-get build-dep linux
[20:13] <genux> is there anyone here ?
[20:14] <LLStarks> yryary
[20:16] <genux> what packages are required to compile the present kernel ? just that I am getting errors with .size on assembly.. which could be a funny nasm ?
[20:16] <jjohansen> genux: this is natty?
[20:16] <genux> yep
[20:17] <jjohansen> genux: friday we started noticing build failures, it seems to be a tool update issue
[20:18] <kamal> genux: looks like this?:   arch/x86/kernel/entry_64.S:1544: Error: .size expression does not evaluate to a constant    <--- the toolchain problem
[20:18] <genux> arh k. do you have any idea on what tool ? is it because of library's 32bit/64bit ? or is it nasm ?
[20:18] <genux> yep
[20:18] <jjohansen> atm you can get around this by building in a maverick chroot, but its an issue that will need to be resolved this week
[20:19] <jjohansen> genux: I'm not sure yet, I didn't pursue it friday, and haven't looked at it today yet either
[20:19] <genux> k.. I wiped off maverick :(. and installed alpha 3.
[20:19] <jjohansen> but we do know that it builds fine in a tool chain from about a week ago, and on maverick
[20:19] <jjohansen> genux: can you install a chroot env
[20:20] <jjohansen> if you have space its easy, using a kernel team script
[20:20] <genux> k cool :). shall do that instead :). thanks very much for the help.
[20:20] <genux> ask a silly question but where would I get the kernel team script ?
[20:20] <jjohansen> genux: just a sec I am looking that one up
[20:20] <genux> yeah I have the space.. 120GB for the install
[20:20] <genux> jjohansen: thanks :)
[20:23] <genux> jjonansen: I would really like to learn more about the kernel process, is there any advice ? I have kernel device drivers book, but would like to re-write the acpi allocation for devices that *believe* the BIOS is saying where something is, but the BIOS has got it wrong. (a problem on my laptop tbh)
[20:23] <kamal> genux, jjohansen: https://wiki.ubuntu.com/Kernel/Action/BuildChroot
[20:24] <jjohansen> kamal: thanks, I have the worst time finding things since the wiki was reworked
[20:24] <kamal> jjohansen: me too ;-)
[20:24] <genux> jjohansen: thanks very much
[20:25] <jjohansen> genux: as for kernel dev, Linux Device Drivers 3rd edition is a good starting point (its a bit dated, but its free).  The new edition of robert loves kernel book is fairly up to date as books go and is good
[20:25] <jjohansen> kernel newbies is also a good start
[20:26] <jjohansen> for Ubuntu specific stuff
[20:26] <jjohansen> https://wiki.ubuntu.com/Kernel/Dev
[20:26] <genux> yeah.. I have subscribed to the kernel newbies :).
[20:26] <genux> thanks for the book (I have got the 3rd edition :) ) and shall get the other one :)
[20:26] <genux> thanks for the ubuntu link.
[20:26] <genux> thanks very much for the help
[20:27] <jjohansen> unforntunately after a certain point its just diving into the code and trying to figure out what is going on (especially on linux, documentation is somewhat lacking)
[20:28] <jjohansen> genux: also the most up to date kernel doc is in the linux kernel it self in the Documentation directory
[20:28] <jjohansen> genux: np
[20:28] <genux> tbh.. that is something that really interest me.. I have done c/c++/java/.net/php etc etc. and really want to get to learn the internals of the OS :) thanks very much
[20:29] <genux> jjohansen: thanks, you have been really helpful :).
[20:29] <jjohansen> genux: glad to be of some help
[20:33] <genux> jjonansen: btw the wiki link, there is a scripts directory within the chroot-setup, chroot-setup/scripts/build-mkschroot, should that be a ln within the chrootsetup directory ?
[20:36] <jjohansen> genux: ?.  I am not sure I follow, you can copy the script to your bin dir, or add it to your path element or execute it in place
[20:37] <jjohansen> so I would normally do ./chroot-setup/build-mkschroot --arch=i386 maverick maverick-i386 http://archive.ubuntu.com/ubuntu
[20:37] <jjohansen> oh and make sure I am in the directory where I want the chroot to be created
[20:37] <jjohansen> and then to enter the chroot I use schroot
[20:37] <jjohansen> schroot -c maverick-i386
[20:38] <jjohansen> s/i386/amd64/  if you want to do a 64bit environment
[20:38] <genux> jjohansen: thanks
[20:38] <genux> :)
[20:38] <jjohansen> the chroot is nice in that it carries processor personality so that you can have both i386 and am64 chroots on the same machine
[20:38] <genux> very cool :)
[20:38] <jjohansen> ie. build i386 and amd64 kernels and not have to think about it
[20:39] <genux> thanks very much
[21:27] <shadeslayer> quick question, can i make the squashfs of a maverick live cd from natty?
[21:27] <shadeslayer> i mean will it be compatible>
[21:28] <shadeslayer> we have squashfs-tools 4.1 in natty and 4.0 in maverick
[21:31] <shadeslayer> ( i'm trying to get a fully updated maverick live CD with backports and updates enabled )