From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752765AbbFHTYW (ORCPT ); Mon, 8 Jun 2015 15:24:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40226 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbbFHTYO (ORCPT ); Mon, 8 Jun 2015 15:24:14 -0400 From: Jeff Moyer To: Tejun Heo Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, vgoyal@redhat.com, avanzini.arianna@gmail.com Subject: Re: [PATCH 5/8] cfq-iosched: remove @gfp_mask from cfq_find_alloc_queue() References: <1433753973-23684-1-git-send-email-tj@kernel.org> <1433753973-23684-6-git-send-email-tj@kernel.org> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Mon, 08 Jun 2015 15:24:12 -0400 In-Reply-To: <1433753973-23684-6-git-send-email-tj@kernel.org> (Tejun Heo's message of "Mon, 8 Jun 2015 17:59:30 +0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tejun Heo writes: > Even when allocations fail, cfq_find_alloc_queue() always returns a > valid cfq_queue by falling back to the oom cfq_queue. As such, there > isn't much point in taking @gfp_mask and trying "harder" if __GFP_WAIT > is set. GFP_ATOMIC allocations don't fail often and even when they do > the degraded behavior is acceptable and temporary. > > After all, the only reason get_request(), which ultimately determines > the gfp_mask, cares about __GFP_WAIT is to guarantee request > allocation, assuming IO forward progress, for callers which are > willing to wait. There's no reason for cfq_find_alloc_queue() to > behave differently on __GFP_WAIT when it already has a fallback > mechanism. > > Remove @gfp_mask from cfq_find_alloc_queue() and propagate the changes > to its callers. This simplifies the function quite a bit and will > help making async queues per-cfq_group. Sorry, I disagree with this patch. You've changed it so that all cfqq allocations are GFP_ATOMIC, and most, if not all of them simply don't need to be. I'll take it one step further and suggest that we should fix cfq_find_alloc_queue to pass the gfp_mask to check_ioprio_changed. That also shouldn't be using GFP_ATOMIC unconditionally. NAK -Jeff