From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756211AbbJIOc7 (ORCPT ); Fri, 9 Oct 2015 10:32:59 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:34715 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755612AbbJIOc4 (ORCPT ); Fri, 9 Oct 2015 10:32:56 -0400 Subject: Re: submit bio directly from userspace To: Dmitry Monakhov , Mike Krinkin , linux-kernel@vger.kernel.org References: <20151007144253.GA26518@kmu-tp-x230> <87si5kz2ta.fsf@openvz.org> Cc: hch@lst.de, kmo@daterainc.com From: Jens Axboe Message-ID: <5617D013.6070507@kernel.dk> Date: Fri, 9 Oct 2015 08:32:51 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <87si5kz2ta.fsf@openvz.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/09/2015 05:41 AM, Dmitry Monakhov wrote: > 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)? A long time ago I wrote binject, which was meant to be a way to directly inject bio's on a queue: http://git.kernel.dk/cgit/linux-block/log/?h=binject It hasn't been moved forward, however. I haven't looked, is is SYNC the only flag addition we are worried about here? There are a slew of other flags that may impact how IO is treated. For instance, file system has tagged the request META. We can't pass that in either. Same is true for FLUSH or FUA writes. -- Jens Axboe