From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965653AbbJILmI (ORCPT ); Fri, 9 Oct 2015 07:42:08 -0400 Received: from mail-lb0-f175.google.com ([209.85.217.175]:33169 "EHLO mail-lb0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934875AbbJILmG (ORCPT ); Fri, 9 Oct 2015 07:42:06 -0400 From: Dmitry Monakhov To: Mike Krinkin , linux-kernel@vger.kernel.org Cc: axboe@kernel.dk, hch@lst.de, kmo@daterainc.com Subject: Re: submit bio directly from userspace In-Reply-To: <20151007144253.GA26518@kmu-tp-x230> References: <20151007144253.GA26518@kmu-tp-x230> User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Fri, 09 Oct 2015 14:41:53 +0300 Message-ID: <87si5kz2ta.fsf@openvz.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Mike Krinkin writes: > Hi, > > i'm developing block layer workload simulator/player and need to > generate bios as close as possible to the ones in original workload. > To play workload i employ aio + O_DIRECT, but all IOs end up as bios > with SYNC flag set. So i wonder is there any way to control bios > flags from userspace or, maybe, any other options to generate > workload from userspace except aio + O_DIRECT with more precise > control over bio flags? 100% agree, I've investigated existing io-load replay tools and seems that they all use O_DIRECT(like btreplay) or buffered-aio/{sync_file_range,fadvise} ( like fio). So it looks like they all very inaccurate. Jens, what do to do to replay real load in order to test fs/ioscheduler harness? Are you interested in having such fine-tuning interface (probably guarded by CAP_SYS_ADMIN)? There are several places where we can pass such flag 1) iocb->aio_flag, add IOCB_FLAG_DIRECT_ASYNC 2) add new flag O_DIRECT_ASYNC to file->f_flags --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBCgAGBQJWF6gBAAoJELhyPTmIL6kBWSgH/i2dBxTH2ifWH22gEKAyNXyt ZgKSGPqaNMwWZHJVyIZISMfkCwE0diHSJ8flCrGGX1o3sibbkyVzScfmzfzrjR1Z zET9xC/RBdpXvlPsyJF4wISSCmHNsjdC7t2zR0y/7ZQlE5EbREvLzpZbG8FZjZ0L WWKBOvic2Bz7UZwri/57FXec5H8GfEoQVrLhttIPzTDtQoiL7QlxXFj47FeLPrUx Gz+ss5VdGV4TZqK3dhRkPh49Xlf5wOUbQON9IgwloAVY1WaYUVgnyntoIdfIC3M3 iK1L7uMqch64oi4kr//e126w8oxLdpKKNt+S5QVvJqepPKbboHFWjD+71JUxS54= =h35R -----END PGP SIGNATURE----- --=-=-=--