From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tao Ma Subject: Re: IOPS based scheduler (Was: Re: [PATCH 18/21] blkcg: move blkio_group_conf->weight to cfq) Date: Thu, 05 Apr 2012 02:36:38 +0800 Message-ID: <4F7C94B6.9080900@tao.ma> References: <4F7A2B21.5000907@tao.ma> <20120403153736.GI5913@redhat.com> <4F7B2708.6080504@tao.ma> <20120403164959.GJ5913@redhat.com> <4F7B32AE.7050900@tao.ma> <20120404133705.GB12676@redhat.com> <4F7C7A91.8040707@tao.ma> <20120404165048.GF12676@redhat.com> <4F7C824D.2050308@tao.ma> <20120404182238.GI12676@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tao.ma; s=default; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=+d/zzsN7OphYyuFLT0DSkXcecG8bgLqnbPFlPqUS+oI=; b=tVMESKyadV2BfUt1bO1rvCM0COJO46B9TvCVHB3qDv67MUeNAEUu3eftHb6AM4anYopFrQx1Fnuj4zYR6wcCOejWsJTKXWEa3OJmHdUu6xs8TzyRVXQkei5V2/4XxpR4; In-Reply-To: <20120404182238.GI12676-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Vivek Goyal Cc: Shaohua Li , Tejun Heo , axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org, ctalbott-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, rni-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org On 04/05/2012 02:22 AM, Vivek Goyal wrote: > On Thu, Apr 05, 2012 at 01:18:05AM +0800, Tao Ma wrote: > > [..] >>> I think a large chunk of that iops scheduler code will be borrowed from >>> CFQ code. All the cgroup logic, queue creation logic, group scheduling >>> logic etc. And that's the reason I was still exploring the possibility >>> of having common code base. >> Yeah, actually I was thinking of abstracting a generic logic, but it >> seems a lot bit hard. Maybe we can try to unify the code later? > > I think if we change the cfqq scheduling logic to something similar to > group scheduling logic, it will help a lot. > > - Current virtual time based logic does not care whether you are operating > in time mode or iops mode. Switching cfqq logic to similar logic will > help moving to iops mode quickly. > > - Keeping track of vtime will help that we will get rid of all the > residual time logic. If some queue was preempted, and did not use full > slice, we will automaticlally charge it less and give smaller vtime. > > - Keeping both the scheduling logic will enable us the smoother > integration of both cfqq and group logic once we support hierarchical > cgroups. > > - It will also enable easier integration of iops related logic. Maybe, I will check all of these after my travel. Also I will try your patch at that time. > > So I am in favor of cleaning up CFQ code and change it to deal with both > time as well iops. Seriously, implmenting time or iops is not hard. It is > about rest of the logic like trees, groups which contributes towards bulk > of the code and I am really not convinced that iops scheduler is going to > be different enough that it needs new io scheduler. Sure, I also want to make my problem perfect resolved while maitaining things simple. Thanks Tao From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932493Ab2DDSgn (ORCPT ); Wed, 4 Apr 2012 14:36:43 -0400 Received: from oproxy9.bluehost.com ([69.89.24.6]:59042 "HELO oproxy9.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932261Ab2DDSgl (ORCPT ); Wed, 4 Apr 2012 14:36:41 -0400 Message-ID: <4F7C94B6.9080900@tao.ma> Date: Thu, 05 Apr 2012 02:36:38 +0800 From: Tao Ma User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: Vivek Goyal CC: Shaohua Li , Tejun Heo , axboe@kernel.dk, ctalbott@google.com, rni@google.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, containers@lists.linux-foundation.org Subject: Re: IOPS based scheduler (Was: Re: [PATCH 18/21] blkcg: move blkio_group_conf->weight to cfq) References: <4F7A2B21.5000907@tao.ma> <20120403153736.GI5913@redhat.com> <4F7B2708.6080504@tao.ma> <20120403164959.GJ5913@redhat.com> <4F7B32AE.7050900@tao.ma> <20120404133705.GB12676@redhat.com> <4F7C7A91.8040707@tao.ma> <20120404165048.GF12676@redhat.com> <4F7C824D.2050308@tao.ma> <20120404182238.GI12676@redhat.com> In-Reply-To: <20120404182238.GI12676@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Identified-User: {1390:box585.bluehost.com:colyli:tao.ma} {sentby:smtp auth 50.1.53.2 authed with tm@tao.ma} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/05/2012 02:22 AM, Vivek Goyal wrote: > On Thu, Apr 05, 2012 at 01:18:05AM +0800, Tao Ma wrote: > > [..] >>> I think a large chunk of that iops scheduler code will be borrowed from >>> CFQ code. All the cgroup logic, queue creation logic, group scheduling >>> logic etc. And that's the reason I was still exploring the possibility >>> of having common code base. >> Yeah, actually I was thinking of abstracting a generic logic, but it >> seems a lot bit hard. Maybe we can try to unify the code later? > > I think if we change the cfqq scheduling logic to something similar to > group scheduling logic, it will help a lot. > > - Current virtual time based logic does not care whether you are operating > in time mode or iops mode. Switching cfqq logic to similar logic will > help moving to iops mode quickly. > > - Keeping track of vtime will help that we will get rid of all the > residual time logic. If some queue was preempted, and did not use full > slice, we will automaticlally charge it less and give smaller vtime. > > - Keeping both the scheduling logic will enable us the smoother > integration of both cfqq and group logic once we support hierarchical > cgroups. > > - It will also enable easier integration of iops related logic. Maybe, I will check all of these after my travel. Also I will try your patch at that time. > > So I am in favor of cleaning up CFQ code and change it to deal with both > time as well iops. Seriously, implmenting time or iops is not hard. It is > about rest of the logic like trees, groups which contributes towards bulk > of the code and I am really not convinced that iops scheduler is going to > be different enough that it needs new io scheduler. Sure, I also want to make my problem perfect resolved while maitaining things simple. Thanks Tao