[[!meta copyright="Copyright © 2013, 2014 Free Software Foundation, Inc."]] [[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable id="license" text="Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled [[GNU Free Documentation License|/fdl]]."]]"""]] [[!tag open_issue_gnumach]] # IRC, freenode, #hurd, 2013-05-10 what code have you used if any (or is it your own implementation) ? I ended up writing my own implementation eh :) the libahci/ahci code from linux is full of linux-specific stuff it would mean working on gluing that which woudl rather be just done in block-dde I was told at fosdem that ahci is not actually very difficult and it isn't indeed that's why i usually encourage to use netbsd code any chance using ahci might speed up our virtual machines ? they are already using DMA, so probably no (with the driver I've pushed) adding support for tagged requests would permit to submit several requests at a time _that_ could improve it (it would make it quite more complex too) but not so much actually What about virtio? will it speed up? [[open_issues/virtio]]. probably not so much because in the end it works the same the guest writes the physical addresse in mapped memory kvm performs the read into th epointed memory, triggers an irq the guest takes the irq, marks as done, starts the next request, etc. most enhancements that virtio could bring can already be achieved with ahci one can probably go further with virtio, but doing it with ahci will also benefit bare hardware http://en.wikipedia.org/wiki/AHCI anatoly: aka SATA some sort of general protocol to work with any SATA drive via AHCI-compatible host controller? yes braunr: I may be mistaken, but it does seem ahci is faster than ide possibly because the ide driver is full of hardcoded wait loops interesting :) usleeps here and there oh right i wonder how they're actually implemented so it would make sense to use that on shattrath a nasty buggy busy-loop yes but ending when ? when a given number of loops have elapsed that's where "buggy" applies :) ok so buggy implies the loop isn't correctly calibrated it isn't calibrated at all actually ew it was probably calibrated on some 486 or pentium hardware :) yeah that's what i imagined too we'll need some measurements but if it's actually true, it's even better news ## IRC, freenode, #hurd, 2013-05-11 ah, also, worth mentioning: the AHCI driver supports up to 2TiB disks (as opposed to our IDE driver which supports only LBA28, 128GiB) supporting more than 2TiB would require an RPC change, or using bigger sectors (which wouldn't be a bad idea anyway) i think we should switch to uint64_t addressable vm_objects which would allow to support large files too braunr: yep ## IRC, freenode, #hurd, 2013-05-13 the hurd, running on vbox, with a sata controler :) hum, problem with an extended partition qemu/kbm doesn't have sata controller, am I right? anatoly: recent versions might http://wiki.qemu.org/Features/AHCI www.linux-kvm.org/wiki/images/7/73/2011-forum-ahci.pdf braunr: found first link, too. Thanx for the second one http://git.qemu.org/?p=qemu.git;a=blob;f=hw/ide/ahci.c;h=eab60961bd818c22cf819d85d0bd5485d3a17754;hb=HEAD looks ok in recent versions looks useful to have virtio drivers though [[open_issues/virtio]]. virtio is shown as fastest way for IO in the presentation Hm, failed to run qemu with AHCI enabled qemu 1.1 from debian testing youpi how do run qemu with AHCI enabled? ## IRC, freenode, #hurd, 2013-05-14 can somebody ask youpi how he runs qemu with AHCI please? I think he used vbox? Did not find any AHCI option for kvm (1.1.2-+dfsg-6) gnu_srs: http://wiki.qemu.org/ChangeLog/0.14#IDE_.2F_AHCI but it doesn't work for me the same version of kvm anatoly: have you checked how the debian package builds it ? braunr: mach sees AHCI device oh :) the problem is in last option "-device ide-drive,drive=disk,bus=ahci.0" lvm says 'invalid option' anatoly: can you give more details please ? lvm ? s/lvm/kvm i don't understand how can mach probe an ahci drive if you can't start kvm ? I ran it without last option then why do you want that option ? But, actually I entered command with mistake. I retried it and it works. But got "start ext2fs: ext2fs: device:hd0s2: No such device or address" Sorry for confusing that's normal it should be sd0s2 Right because the device names are different be aware that gnumach couln't see my extended partitions when i tried that yesterday i don't know what causes the problem Yeah, I understand, I just note about it to show that it works :) And I was wring s/wring/wrong is that the version in wheezy ? I'm using testing, but it's same great the sceen.net VMs will soon use that then I don't have extended partions Booted with AHCI! :-) It freezes while downloading packages for build-essential fake-root dependencies with AHCI enabled anatoly: is the IRQ of the ahci controller the same as for your ethernet device? (you can see that in lspci -v) youpi: will check youpi both uses IRQ 111 s/111/11 aw anatoly: ok, that might be why is this kvm? if so, you can set up a second ahci controler and attach devices to it so the irq is not the same basically, the issue is about dde disabling the irq during interrupt handler which conflicts with ahci driver needs ## IRC, freenode, #hurd, 2013-05-15 youpi: yes, it's kvm. Will try a second ahci controller I read recentrly was added ahci driver, is it in userland or kernel-land? kernel-land the change was in gnumach ## IRC, freenode, #hurd, 2013-05-18 about the IRQ conflict, it's simply that both dde and the ahci driver need to disable it it needs to be coherent somehow ## IRC, freenode, #hurd, 2013-05-20 gnu_srs: kvm -m 1G -drive id=disk,file=,if=none,cache=writeback -device ahci,id=ahci-1 -device ahci,id=ahci-2 -device ide-drive,drive=disk,bus=ahci-2.0 who knows what does "ich9-ahci.multifunction=on/off" parameter for kvm's ahci device mean? well, I was a bit incorrect :-) The options is relative to PCI miltifunction devices s/options is relative/options relates ## IRC, freenode, #hurd, 2013-05-24 I don't see freezes anymore while downloading packages with AHCI enabled anatoly: by fixing the shared IRQ ? youpi: yes, I added second AHCI as you suggested ok so it's probably the shared IRQ issue NIC and AHCI have similar IRQ when only one AHCI is enabled according lspci output yes ## IRC, freenode, #hurd, 2013-06-18 youpi: is there a simple way from hurd to check interrupts ? what do you mean by "check interrupts" ? if they're shared I still don't understand :) i'm setting up sata ah, knowing the number yes you can read that from lspci -v ok thanks hum i get set root='hd-49,msdos1' in grub.cfg when changing the device.map file to point to sd0 hum i wonder if it's necessary i guess i just have to tell gnumach to look for sd0, not grub youpi: the trick you mentioned was to add another controler, right ? yes ok youpi: looks fine :) and yes, i left hd0 in grub's device.map although i have lots of errors on hd0s6 (/home) youpi: there must be a bug with large sizes i'll stick with ide for now, but at least setting sata with libvirt was quite easy to do so we can easily switch later ## IRC, freenode, #hurd, 2013-10-22 youpi: do I need to do anything to enable the ahci driver? gnumach 1.4 should include it, right? it should, yes make sure to put your board in ahci mode, not raid mode (and not ata mode) youpi: hm, I will try to do so youpi: does the driver print anything to the console? teythoon: yes, AHCI SATA 00:04.0 BAR 0xfebf1000 IRQ 11 youpi: well, the bios has two modes of operation, 'raid' and 'ide', I selected 'ide' ergl youpi: hm, I think my board has no ahci controller, linux uses the sata_via module to talk to it :/ ah :/ # IRC, freenode, #hurd, 2014-02-05 teythoon: i don't completely trust the driver oh ? it doesn't work on my laptop, and i had a failure once on a "big" partition of 128G hm my hardware does not implement ahci, but in qemu it works fine for me well qemu is the only supported "hardware" but then my partitions are not that big braunr: no, it does work on my laptop too ok # IRC, freenode, #hurd, 2014-02-12 youpi: hum, sorry to ask but how do you use qemu to provide sata ? braunr: there's an important trick: getting it on another IRQ than the eth0 board :/ -device ahci,id=ahci1 for nothing -device ahci,id=ahci2 -drive id=root,file=/dev/${HDA}7,cache=writeback,if=none -device ide-drive,drive=root,bus=ahci2.1 ok that's close enough to what i have but i'm using /dev/sda as the backend instead of a regular file sda already containing a regular debian linux system and grub2 can't boot because it seems to fail reading the partition table it works perfectly when accessing it as an ide disk though youpi: do you see any reason why grub would fail with ahci ? also, why ahci2._1_ instead of 0 ? youpi: fyi, the cd installer always booted fine here, both on my workstation and my laptop, i did about 50 tries on each machine the graphical mode doesn't seem to work though youpi: fyi2 the grub related issue i'm having is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=692249 I'm using .1 because I have a /boot .0 before the / .1 :) humm you have two drives ? braunr: (cd installer): you mean, even in semi-graphical mode? one for /boot and the other for / ? I have 3 actually :) youpi: no, xorg ok i se see (cd installer) I'm talking about the working ones :) I know xorg does not boot ok so apparently, adding ,boot=on to the -drive parameter did the trick k and now, i have a hurd system running from /dev/sda5 (the real disk) in qemu for the pseudo-graphical console, I guess his monitor is too dumb to be able to display 640x400 possible most probably because no OS uses that any more nowadays :/ (and that won't get better) so now i can debug ahci on my laptop using that :) youpi: is there a known limit to the size of an ahci drive in the gnumach driver ? in the driver itself, it's simply lba48 but the mach interface uses 32bit sector number thus 2TB limit that's plenty :) I have a 2TB drive :) so it won't be plenty for long 2TB for your hurd system ? no, for my backups etc. i meant plenty for our hurd instances but there could have been a hurd vm there and not necesseraly below 2TiB hm, the installer doesn't detect existing partitions on an ahci drive :/ ## IRC, freenode, #hurd, 2014-02-13 youpi: looks like linux has trouble handling my ahci drive without ioapic/msi no wonder gnumach can't either erf