Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754727AbdDGHsH (ORCPT ); Fri, 7 Apr 2017 03:48:07 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:35716 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbdDGHr6 (ORCPT ); Fri, 7 Apr 2017 03:47:58 -0400 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: [PATCH V2 11/16] block, bfq: reduce idling only in symmetric scenarios From: Paolo Valente In-Reply-To: <1490973609.2587.3.camel@sandisk.com> Date: Fri, 7 Apr 2017 09:47:53 +0200 Cc: "tj@kernel.org" , "axboe@kernel.dk" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "samuele.zecchini92@gmail.com" , "fchecconi@gmail.com" , "linus.walleij@linaro.org" , Arianna Avanzini , "broonie@kernel.org" , "riccardo.pizzetti@gmail.com" , "ulf.hansson@linaro.org" Message-Id: <2F5C851A-CE28-4159-AC60-8D42884E6EF1@linaro.org> References: <20170331124743.3530-1-paolo.valente@linaro.org> <20170331124743.3530-12-paolo.valente@linaro.org> <1490973609.2587.3.camel@sandisk.com> To: Bart Van Assche X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v377niDp005301 Content-Length: 704 Lines: 19 > Il giorno 31 mar 2017, alle ore 17:20, Bart Van Assche ha scritto: > > On Fri, 2017-03-31 at 14:47 +0200, Paolo Valente wrote: >> + entity->weight_counter = kzalloc(sizeof(struct bfq_weight_counter), >> + GFP_ATOMIC); >> + entity->weight_counter->weight = entity->weight; > > GFP_ATOMIC allocations are more likely to fail than GFP_KERNEL allocations. > What will happen if kzalloc() returns NULL? > A plain crash :( I'm adding the simple handling of this forgotten exception. If I don't get other reviews in the next days, I'll post a V3 addressing this and the other issue you highlighted. Thanks, Paolo > Bart.