summaryrefslogtreecommitdiff
path: root/include/uapi/linux/dm-log-userspace.h
diff options
context:
space:
mode:
authorDongmao Zhang <dmzhang@suse.com>2014-01-16 01:44:37 +0400
committerMike Snitzer <snitzer@redhat.com>2014-01-22 08:46:27 +0400
commit5066a4df1f427faac8372d20494483bb09a4a1cd (patch)
tree8003d4e33188a862bd9bf8ea6a06f4457084f5bf /include/uapi/linux/dm-log-userspace.h
parentfca028438fb903852beaf7c3fe1cd326651af57d (diff)
downloadlinux-5066a4df1f427faac8372d20494483bb09a4a1cd.tar.xz
dm log userspace: allow mark requests to piggyback on flush requests
In the cluster evironment, cluster write has poor performance because userspace_flush() has to contact a userspace program (cmirrord) for clear/mark/flush requests. But both mark and flush requests require cmirrord to communicate the message to all the cluster nodes for each flush call. This behaviour is really slow. To address this we now merge mark and flush requests together to reduce the kernel-userspace-kernel time. We allow a new directive, "integrated_flush" that can be used to instruct the kernel log code to combine flush and mark requests when directed by userspace. If not directed by userspace (due to an older version of the userspace code perhaps), the kernel will function as it did previously - preserving backwards compatibility. Additionally, flush requests are performed lazily when only clear requests exist. Signed-off-by: Dongmao Zhang <dmzhang@suse.com> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'include/uapi/linux/dm-log-userspace.h')
-rw-r--r--include/uapi/linux/dm-log-userspace.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/include/uapi/linux/dm-log-userspace.h b/include/uapi/linux/dm-log-userspace.h
index 0678c2adc421..0fa0d9ef06a5 100644
--- a/include/uapi/linux/dm-log-userspace.h
+++ b/include/uapi/linux/dm-log-userspace.h
@@ -201,11 +201,18 @@
* int (*flush)(struct dm_dirty_log *log);
*
* Payload-to-userspace:
- * None.
+ * If the 'integrated_flush' directive is present in the constructor
+ * table, the payload is as same as DM_ULOG_MARK_REGION:
+ * uint64_t [] - region(s) to mark
+ * else
+ * None
* Payload-to-kernel:
* None.
*
- * No incoming or outgoing payload. Simply flush log state to disk.
+ * If the 'integrated_flush' option was used during the creation of the
+ * log, mark region requests are carried as payload in the flush request.
+ * Piggybacking the mark requests in this way allows for fewer communications
+ * between kernel and userspace.
*
* When the request has been processed, user-space must return the
* dm_ulog_request to the kernel - setting the 'error' field and clearing
@@ -385,8 +392,15 @@
* version 2: DM_ULOG_CTR allowed to return a string containing a
* device name that is to be registered with DM via
* 'dm_get_device'.
+ * version 3: DM_ULOG_FLUSH is capable of carrying payload for marking
+ * regions. This "integrated flush" reduces the number of
+ * requests between the kernel and userspace by effectively
+ * merging 'mark' and 'flush' requests. A constructor table
+ * argument ('integrated_flush') is required to turn this
+ * feature on, so it is backwards compatible with older
+ * userspace versions.
*/
-#define DM_ULOG_REQUEST_VERSION 2
+#define DM_ULOG_REQUEST_VERSION 3
struct dm_ulog_request {
/*