From: Ian Jackson Subject: Re: [PATCH v10] remus drbd: Implement remus drbd replicated disk Date: Fri, 6 Jun 2014 12:23:02 +0100 Message-ID: <21393.42134.875988.870519@mariner.uk.xensource.com> References: <1401932069-16460-6-git-send-email-yanghy@cn.fujitsu.com> <1401932386-16538-1-git-send-email-yanghy@cn.fujitsu.com> <21392.43961.872654.69939@mariner.uk.xensource.com> <21392.46694.328196.953300@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21392.46694.328196.953300@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: rshriram@cs.ubc.ca, Andrew Cooper , Lai Jiangshan , Roger Pau =?utf-8?Q?Monn=C3=A9?= , Jiang Yunhong , Wen Congyang , Dong Eddie , Yang Hongyang , "xen-devel@lists.xen.org" , Ian Campbell List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("Re: [PATCH v10] remus drbd: Implement remus drbd replicated disk"): > Shriram Rajagopalan writes ("Re: [PATCH v10] remus drbd: Implement remus drbd replicated disk"): > > Nope. I designed the relevant drbd code such that the ioctl wait times out > > (configurable) in worst case, returning an error. The time out is generally > > about 300ms. This code path is exercised only during failures. > > If you think this ioctl will, when there is no error, complete > immediately, can we have a non-blocking [version], and fall back to the > fork trick ? > > Or better still, is there something we could poll() on to find out > when the ioctl will definitely complete ? Or, you say the timeout is configurable ? If it's configurable per control fd, could we perhaps do this: 1. set the timeout to zero 2. make the ioctl DRBD_WAIT_CHECKPOINT_ACK if the ioctl says "timeout", fork and: 3. set the timeout to something sane 4. make the ioctl again 5. in the parent, use the asynchronous child wait machinery ? This depends on DRBD_WAIT_CHECKPOINT_ACK doing something sensible if called again after having timed out. I hesitate to suggest it, but if there is no better way, perhaps we will have to make a special-purpose thread just for issuing this ioctl. That would be a pain. So, Shriram, suggestions/opinions/etc. welcome. Thanks, Ian.