X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=syslet.h;h=ded5c4a778192271574cb73e56d4ab7e43ee7a4d;hp=d89abd440822f0fcf74c9cb7c3cb3c9670749a02;hb=ac684785b41aaf17593b375be8d3e89b83974c1a;hpb=ad18c1ecc367c55e4d10acb05790be2c946053e2 diff --git a/syslet.h b/syslet.h index d89abd44..ded5c4a7 100644 --- a/syslet.h +++ b/syslet.h @@ -37,16 +37,16 @@ * jump a full syslet_uatom number of bytes.) ] */ struct syslet_uatom { - unsigned long flags; - unsigned long nr; - long __user *ret_ptr; - struct syslet_uatom __user *next; - unsigned long __user *arg_ptr[6]; + uint32_t flags; + uint32_t nr; + uint64_t ret_ptr; + uint64_t next; + uint64_t arg_ptr[6]; /* * User-space can put anything in here, kernel will not * touch it: */ - void __user *private; + uint64_t private; }; /* @@ -78,7 +78,7 @@ struct syslet_uatom { /* * Execution control: conditions upon the return code - * of the previous syslet atom. 'Stop' means syslet + * of the just executed syslet atom. 'Stop' means syslet * execution is stopped and the atom is put into the * completion ring: */ @@ -105,36 +105,51 @@ struct syslet_uatom { /* * This is the (per-user-context) descriptor of the async completion - * ring. This gets registered via sys_async_register(). + * ring. This gets passed in to sys_async_exec(): */ struct async_head_user { /* - * Pointers to completed async syslets (i.e. syslets that + * Current completion ring index - managed by the kernel: + */ + uint64_t kernel_ring_idx; + /* + * User-side ring index: + */ + uint64_t user_ring_idx; + + /* + * Ring of pointers to completed async syslets (i.e. syslets that * generated a cachemiss and went async, returning -EASYNCSYSLET * to the user context by sys_async_exec()) are queued here. - * Syslets that were executed synchronously are not queued here. + * Syslets that were executed synchronously (cached) are not + * queued here. * * Note: the final atom that generated the exit condition is * queued here. Normally this would be the last atom of a syslet. */ - struct syslet_uatom __user **completion_ring; + uint64_t completion_ring_ptr; + /* * Ring size in bytes: */ - unsigned long ring_size_bytes; + uint64_t ring_size_bytes; /* - * Maximum number of asynchronous contexts the kernel creates. - * - * -1UL has a special meaning: the kernel manages the optimal - * size of the async pool. - * - * Note: this field should be valid for the lifetime of async - * processing, because future kernels detect changes to this - * field. (enabling user-space to control the size of the async - * pool in a low-overhead fashion) + * The head task can become a cachemiss thread later on + * too, if it blocks - so it needs its separate thread + * stack and start address too: + */ + uint64_t head_stack; + uint64_t head_ip; + + /* + * Newly started async kernel threads will take their + * user stack and user start address from here. User-space + * code has to check for new_thread_stack going to NULL + * and has to refill it with a new stack if that happens. */ - unsigned long max_nr_threads; + uint64_t new_thread_stack; + uint64_t new_thread_ip; }; #endif