[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

active swapping using rumpdisk



Swap activity in a rumpdisk based system soon results in a locked system. I think I've identified 1 part of the problem occurring within ipc_kmsg_copyin_body(). Using rumpdisk, vm_map_copyin() is being used to copy in data for messages rather than vm_map_copyin_page_list(). The system lock occurs when a page that is referenced in the message is swapped out before that message is processed by the receiving task. This wouldn't happen using page_list copy as those pages are kept in a busy state that prevents them from being paged out.

The reason that page lists are not used is that the rump disk port is not configured as an IKOT_DEVICE. The equivalent non-rumpdisk device port is set using:

(gnumach/linux/dev/glue/block.c)

  ipc_kobject_set (bd->port, (ipc_kobject_t) &bd->device, IKOT_DEVICE);

I cannot see a simple method of achieving the same in rumpdisk but to test a similar effect I 'hacked' ipc_kmsg_copyin_body() to use page lists for many of the messages intended for the rumpdisk task to pseudo-test the alteration:

        if (kmsg->ikm_header.msgh_id >= 2800 &&
            kmsg->ikm_header.msgh_id < 2900)
          use_page_lists = TRUE;

This results in many successful iterations of my stress test case whereas normally it locks very swiftly.

Is there a mechanism that can be used outside of the kernel to configure the rumpdisk ports as IKOT_DEVICE ports so that it can be tested properly?

Regards,

Mike.


Reply to: