From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752930AbcGUDgi (ORCPT ); Wed, 20 Jul 2016 23:36:38 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33779 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752083AbcGUDgg (ORCPT ); Wed, 20 Jul 2016 23:36:36 -0400 Subject: Re: [PATCH v2] block: do not merge requests without consulting with io scheduler To: Tahsin Erdogan References: <1467917302-1232-1-git-send-email-tahsin@google.com> Cc: kbuild test robot , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org From: Jens Axboe Message-ID: <1a1a7773-4a9f-f989-ea00-2ec3ff5fe937@kernel.dk> Date: Wed, 20 Jul 2016 21:36:33 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <1467917302-1232-1-git-send-email-tahsin@google.com> 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 07/07/2016 12:48 PM, Tahsin Erdogan wrote: > Before merging a bio into an existing request, io scheduler is called to > get its approval first. However, the requests that come from a plug > flush may get merged by block layer without consulting with io > scheduler. > > In case of CFQ, this can cause fairness problems. For instance, if a > request gets merged into a low weight cgroup's request, high weight cgroup > now will depend on low weight cgroup to get scheduled. If high weigt cgroup > needs that io request to complete before submitting more requests, then it > will also lose its timeslice. > > Following script demonstrates the problem. Group g1 has a low weight, g2 > and g3 have equal high weights but g2's requests are adjacent to g1's > requests so they are subject to merging. Due to these merges, g2 gets > poor disk time allocation. Looks (and seems) sane to me, no reason why the plug path should be different. Applied for 4.8, thanks. -- Jens Axboe