dm log userspace: allow mark requests to piggyback on flush requests
authorDongmao Zhang <dmzhang@suse.com>
Wed, 15 Jan 2014 21:44:37 +0000 (15:44 -0600)
committerMike Snitzer <snitzer@redhat.com>
Wed, 22 Jan 2014 04:46:27 +0000 (23:46 -0500)
commit5066a4df1f427faac8372d20494483bb09a4a1cd
tree8003d4e33188a862bd9bf8ea6a06f4457084f5bf
parentfca028438fb903852beaf7c3fe1cd326651af57d
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>
drivers/md/dm-log-userspace-base.c
include/uapi/linux/dm-log-userspace.h