From patchwork Thu Apr 28 13:24:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 8971161 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 95E43BF29F for ; Thu, 28 Apr 2016 14:12:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 94B622027D for ; Thu, 28 Apr 2016 14:12:41 +0000 (UTC) Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 74B4B200E1 for ; Thu, 28 Apr 2016 14:12:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3SE8NfA012108; Thu, 28 Apr 2016 10:08:24 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3SDORKm007236 for ; Thu, 28 Apr 2016 09:24:27 -0400 Received: from mx1.redhat.com (ext-mx01.extmail.prod.ext.phx2.redhat.com [10.5.110.25]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3SDORTg028205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 28 Apr 2016 09:24:27 -0400 Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F8377F6CF; Thu, 28 Apr 2016 13:24:26 +0000 (UTC) Received: by mail-wm0-f47.google.com with SMTP id a17so65225720wme.0; Thu, 28 Apr 2016 06:24:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BIur/d54M9hrONHqyS+YZWtUC6tT8XCbBuXwhmz7orE=; b=LeZkq3RgTt4QsRovOqJnQ/FqWnmfIRkkrsgWL74kETzGKj3ZvHJuniQ/3hrOym9Y5+ /9TLvceO3LIwwQtE4gKo2pIlKHbaf8SDQ2/AuINyqxIblzgIXeZ2EwvA8WIx1hgihO2w 7w7Fy/7WcZ1cOWkkIbe1Gp/tVXxdHvebQ1xDt7rXfAZjQNKXYt9YBSg1ua7HxVa2ztzy c3EQFqn7KQag7s4U8hVjLxdsmK5q+vkOAfs8ayuQI65Y3fUFK9sz4SRfwn3aDInqxX1K P5j4fIZf5L4gbOPnpjkUE9bWLSW4Ax5mpkNdNw1qApQprz7WZydFxYGUHQ85HwvXZ9y3 3Teg== X-Gm-Message-State: AOPr4FXGTdmQ3TZKA2Or4qiDSnm+nIMbKagrIxtvVwf361BAq3v36cCT79gUd5jCZ1NDsA== X-Received: by 10.28.169.11 with SMTP id s11mr20611213wme.62.1461849865187; Thu, 28 Apr 2016 06:24:25 -0700 (PDT) Received: from tiehlicka.suse.cz (nat1.scz.suse.com. [213.151.88.250]) by smtp.gmail.com with ESMTPSA id m6sm9697699wje.21.2016.04.28.06.24.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Apr 2016 06:24:24 -0700 (PDT) From: Michal Hocko To: Andrew Morton Date: Thu, 28 Apr 2016 15:24:03 +0200 Message-Id: <1461849846-27209-18-git-send-email-mhocko@kernel.org> In-Reply-To: <1461849846-27209-1-git-send-email-mhocko@kernel.org> References: <1461849846-27209-1-git-send-email-mhocko@kernel.org> X-RedHat-Spam-Score: -0.12 (BAYES_50, DCC_REPUT_00_12, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 74.125.82.47 mail-wm0-f47.google.com 74.125.82.47 mail-wm0-f47.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.75 on 10.5.110.25 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Thu, 28 Apr 2016 10:08:22 -0400 Cc: Michal Hocko , LKML , linux-mm@kvack.org, dm-devel@redhat.com, Mikulas Patocka , Shaohua Li Subject: [dm-devel] [PATCH 17/20] dm: get rid of superfluous gfp flags X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Michal Hocko copy_params seems to be little bit confused about which allocation flags to use. It enforces GFP_NOIO even though it uses memalloc_noio_{save,restore} which enforces GFP_NOIO at the page allocator level automatically (via memalloc_noio_flags). It also uses __GFP_REPEAT for the __vmalloc request which doesn't make much sense either because vmalloc doesn't rely on costly high order allocations. Let's just drop the __GFP_REPEAT and leave the further cleanup to later changes. Cc: Shaohua Li Cc: Mikulas Patocka Cc: dm-devel@redhat.com Signed-off-by: Michal Hocko --- drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 2adf81d81fca..2c7ca258c4e4 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1723,7 +1723,7 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl *param_kern if (!dmi) { unsigned noio_flag; noio_flag = memalloc_noio_save(); - dmi = __vmalloc(param_kernel->data_size, GFP_NOIO | __GFP_REPEAT | __GFP_HIGH | __GFP_HIGHMEM, PAGE_KERNEL); + dmi = __vmalloc(param_kernel->data_size, GFP_NOIO | __GFP_HIGH | __GFP_HIGHMEM, PAGE_KERNEL); memalloc_noio_restore(noio_flag); if (dmi) *param_flags |= DM_PARAMS_VMALLOC;