···7373realtime tasks have explicitly allocated the CPU time they need to perform7474their tasks, buffer underruns in the graphics or audio can be eliminated.75757676-NOTE: the above example is not fully implemented as of yet (2.6.25). We still7676+NOTE: the above example is not fully implemented yet. We still7777lack an EDF scheduler to make non-uniform periods usable.78787979···140140141141.o CONFIG_CGROUP_SCHED (aka "Basis for grouping tasks" = "Control groups")142142143143-This uses the /cgroup virtual file system and "/cgroup/<cgroup>/cpu.rt_runtime_us"144144-to control the CPU time reserved for each control group instead.143143+This uses the /cgroup virtual file system and144144+"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each145145+control group instead.145146146147For more information on working with control groups, you should read147148Documentation/cgroups/cgroups.txt as well.148149149149-Group settings are checked against the following limits in order to keep the configuration150150-schedulable:150150+Group settings are checked against the following limits in order to keep the151151+configuration schedulable:151152152153 \Sum_{i} runtime_{i} / global_period <= global_runtime / global_period153154···190189the biggest challenge as the current linux PI infrastructure is geared towards191190the limited static priority levels 0-99. With deadline scheduling you need to192191do deadline inheritance (since priority is inversely proportional to the193193-deadline delta (deadline - now).192192+deadline delta (deadline - now)).194193195194This means the whole PI machinery will have to be reworked - and that is one of196195the most complex pieces of code we have.
···3030#include <asm/hw_irq.h>3131#include <asm/kvm_para.h>32323333-/*G:031 But first, how does our Guest contact the Host to ask for privileged3333+/*G:030 But first, how does our Guest contact the Host to ask for privileged3434 * operations? There are two ways: the direct way is to make a "hypercall",3535 * to make requests of the Host Itself.3636 *
+3-11
arch/x86/kernel/apic/io_apic.c
···41814181 }41824182}4183418341844184-static int __init ioapic_insert_resources(void)41844184+void __init ioapic_insert_resources(void)41854185{41864186 int i;41874187 struct resource *r = ioapic_resources;4188418841894189 if (!r) {41904190- if (nr_ioapics > 0) {41904190+ if (nr_ioapics > 0)41914191 printk(KERN_ERR41924192 "IO APIC resources couldn't be allocated.\n");41934193- return -1;41944194- }41954195- return 0;41934193+ return;41964194 }4197419541984196 for (i = 0; i < nr_ioapics; i++) {41994197 insert_resource(&iomem_resource, r);42004198 r++;42014199 }42024202-42034203- return 0;42044200}42054205-42064206-/* Insert the IO APIC resources after PCI initialization has occured to handle42074207- * IO APICS that are mapped in on a BAR in PCI space. */42084208-late_initcall(ioapic_insert_resources);
+6-1
arch/x86/lguest/boot.c
···379379380380 native_cpuid(ax, bx, cx, dx);381381 switch (function) {382382+ case 0: /* ID and highest CPUID. Futureproof a little by sticking to383383+ * older ones. */384384+ if (*ax > 5)385385+ *ax = 5;386386+ break;382387 case 1: /* Basic feature request. */383388 /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */384389 *cx &= 0x00002201;···10841079 return insn_len;10851080}1086108110871087-/*G:030 Once we get to lguest_init(), we know we're a Guest. The various10821082+/*G:029 Once we get to lguest_init(), we know we're a Guest. The various10881083 * pv_ops structures in the kernel provide points for (almost) every routine we10891084 * have to override to avoid privileged instructions. */10901085__init void lguest_init(void)
+7
arch/x86/pci/i386.c
···3535#include <asm/pat.h>3636#include <asm/e820.h>3737#include <asm/pci_x86.h>3838+#include <asm/io_apic.h>383939404041static int···228227 pcibios_allocate_resources(1);229228230229 e820_reserve_resources_late();230230+ /*231231+ * Insert the IO APIC resources after PCI initialization has232232+ * occured to handle IO APICS that are mapped in on a BAR in233233+ * PCI space, but before trying to assign unassigned pci res.234234+ */235235+ ioapic_insert_resources();231236}232237233238/**
+4-1
drivers/block/virtio_blk.c
···213213 * Only allow the generic SCSI ioctls if the host can support it.214214 */215215 if (!virtio_has_feature(vblk->vdev, VIRTIO_BLK_F_SCSI))216216- return -ENOIOCTLCMD;216216+ return -ENOTTY;217217218218 return scsi_cmd_ioctl(disk->queue, disk, mode, cmd, argp);219219}···359359 /* We can handle whatever the host told us to handle. */360360 blk_queue_max_phys_segments(vblk->disk->queue, vblk->sg_elems-2);361361 blk_queue_max_hw_segments(vblk->disk->queue, vblk->sg_elems-2);362362+363363+ /* No need to bounce any requests */364364+ blk_queue_bounce_limit(vblk->disk->queue, BLK_BOUNCE_ANY);362365363366 /* No real sector limit. */364367 blk_queue_max_sectors(vblk->disk->queue, -1U);
-3
drivers/char/n_tty.c
···1331133113321332static void n_tty_write_wakeup(struct tty_struct *tty)13331333{13341334- /* Write out any echoed characters that are still pending */13351335- process_echoes(tty);13361336-13371334 if (tty->fasync && test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags))13381335 kill_fasync(&tty->fasync, SIGIO, POLL_OUT);13391336}
+8-4
drivers/char/nozomi.c
···828828 struct port *port = &dc->port[index];829829 void __iomem *addr = port->dl_addr[port->toggle_dl];830830 struct tty_struct *tty = tty_port_tty_get(&port->port);831831- int i;831831+ int i, ret;832832833833 if (unlikely(!tty)) {834834 DBG1("tty not open for port: %d?", index);···844844845845 /* disable interrupt in downlink... */846846 disable_transmit_dl(index, dc);847847- return 0;847847+ ret = 0;848848+ goto put;848849 }849850850851 if (unlikely(size == 0)) {851852 dev_err(&dc->pdev->dev, "size == 0?\n");852852- return 1;853853+ ret = 1;854854+ goto put;853855 }854856855857 tty_buffer_request_room(tty, size);···873871 }874872875873 set_bit(index, &dc->flip);874874+ ret = 1;875875+put:876876 tty_kref_put(tty);877877- return 1;877877+ return ret;878878}879879880880/* Debug for interrupts */
+15-10
drivers/char/tty_ldisc.c
···790790 * N_TTY.791791 */792792 if (tty->driver->flags & TTY_DRIVER_RESET_TERMIOS) {793793- /* Avoid racing set_ldisc */793793+ /* Avoid racing set_ldisc or tty_ldisc_release */794794 mutex_lock(&tty->ldisc_mutex);795795- /* Switch back to N_TTY */796796- tty_ldisc_halt(tty);797797- tty_ldisc_wait_idle(tty);798798- tty_ldisc_reinit(tty);799799- /* At this point we have a closed ldisc and we want to800800- reopen it. We could defer this to the next open but801801- it means auditing a lot of other paths so this is a FIXME */802802- WARN_ON(tty_ldisc_open(tty, tty->ldisc));803803- tty_ldisc_enable(tty);795795+ if (tty->ldisc) { /* Not yet closed */796796+ /* Switch back to N_TTY */797797+ tty_ldisc_halt(tty);798798+ tty_ldisc_wait_idle(tty);799799+ tty_ldisc_reinit(tty);800800+ /* At this point we have a closed ldisc and we want to801801+ reopen it. We could defer this to the next open but802802+ it means auditing a lot of other paths so this is803803+ a FIXME */804804+ WARN_ON(tty_ldisc_open(tty, tty->ldisc));805805+ tty_ldisc_enable(tty);806806+ }804807 mutex_unlock(&tty->ldisc_mutex);805808 tty_reset_termios(tty);806809 }···868865869866 tty_ldisc_wait_idle(tty);870867868868+ mutex_lock(&tty->ldisc_mutex);871869 /*872870 * Now kill off the ldisc873871 */···879875880876 /* Ensure the next open requests the N_TTY ldisc */881877 tty_set_termios_ldisc(tty, N_TTY);878878+ mutex_unlock(&tty->ldisc_mutex);882879883880 /* This will need doing differently if we need to lock */884881 if (o_tty)
···669669670670 err = pci_register_driver(&virtio_pci_driver);671671 if (err)672672- device_unregister(virtio_pci_root);672672+ root_device_unregister(virtio_pci_root);673673674674 return err;675675}
-1
include/linux/console_struct.h
···8989 unsigned int vc_need_wrap : 1;9090 unsigned int vc_can_do_color : 1;9191 unsigned int vc_report_mouse : 2;9292- unsigned int vc_kmalloced : 1;9392 unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */9493 unsigned char vc_utf_count;9594 int vc_utf_char;
+1-1
include/linux/hrtimer.h
···448448449449static inline void timer_stats_account_hrtimer(struct hrtimer *timer)450450{451451- if (likely(!timer->start_pid))451451+ if (likely(!timer->start_site))452452 return;453453 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,454454 timer->function, timer->start_comm, 0);
+1-1
include/linux/lguest.h
···1111#define LG_CLOCK_MIN_DELTA 100UL1212#define LG_CLOCK_MAX_DELTA ULONG_MAX13131414-/*G:032 The second method of communicating with the Host is to via "struct1414+/*G:031 The second method of communicating with the Host is to via "struct1515 * lguest_data". Once the Guest's initialization hypercall tells the Host where1616 * this is, the Guest and Host both publish information in it. :*/1717struct lguest_data
+10-4
include/linux/virtio_net.h
···2727#define VIRTIO_NET_F_CTRL_VQ 17 /* Control channel available */2828#define VIRTIO_NET_F_CTRL_RX 18 /* Control channel RX mode support */2929#define VIRTIO_NET_F_CTRL_VLAN 19 /* Control channel VLAN filtering */3030+#define VIRTIO_NET_F_CTRL_RX_EXTRA 20 /* Extra RX mode control support */30313132#define VIRTIO_NET_S_LINK_UP 1 /* Link is up */3233···8281#define VIRTIO_NET_ERR 183828483/*8585- * Control the RX mode, ie. promisucous and allmulti. PROMISC and8686- * ALLMULTI commands require an "out" sg entry containing a 1 byte8787- * state value, zero = disable, non-zero = enable. These commands8888- * are supported with the VIRTIO_NET_F_CTRL_RX feature.8484+ * Control the RX mode, ie. promisucous, allmulti, etc...8585+ * All commands require an "out" sg entry containing a 1 byte8686+ * state value, zero = disable, non-zero = enable. Commands8787+ * 0 and 1 are supported with the VIRTIO_NET_F_CTRL_RX feature.8888+ * Commands 2-5 are added with VIRTIO_NET_F_CTRL_RX_EXTRA.8989 */9090#define VIRTIO_NET_CTRL_RX 09191 #define VIRTIO_NET_CTRL_RX_PROMISC 09292 #define VIRTIO_NET_CTRL_RX_ALLMULTI 19393+ #define VIRTIO_NET_CTRL_RX_ALLUNI 29494+ #define VIRTIO_NET_CTRL_RX_NOMULTI 39595+ #define VIRTIO_NET_CTRL_RX_NOUNI 49696+ #define VIRTIO_NET_CTRL_RX_NOBCAST 593979498/*9599 * Control the MAC filter table.
···687687 * all of which have the same weight.688688 */689689 if (sched_feat(NORMALIZED_SLEEPER) &&690690- task_of(se)->policy != SCHED_IDLE)690690+ (!entity_is_task(se) ||691691+ task_of(se)->policy != SCHED_IDLE))691692 thresh = calc_delta_fair(thresh, se);692693693694 vruntime -= thresh;