From patchwork Thu Apr 14 08:51:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Hocko X-Patchwork-Id: 8832981 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 742619F3D1 for ; Thu, 14 Apr 2016 08:52:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9378D202D1 for ; Thu, 14 Apr 2016 08:52:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C0B8B20274 for ; Thu, 14 Apr 2016 08:52:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752833AbcDNIv6 (ORCPT ); Thu, 14 Apr 2016 04:51:58 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33296 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752540AbcDNIv5 (ORCPT ); Thu, 14 Apr 2016 04:51:57 -0400 Received: by mail-wm0-f65.google.com with SMTP id y144so20738757wmd.0; Thu, 14 Apr 2016 01:51:56 -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=aBq+Oxht3dlGbV49Yw65nMrXbR4fpYyGvK1hZort5Pw=; b=G4SAOm3ziTIQoAaIlzkc6OOGtTHMS4BEBasVoQlCsMsxBU3pYPk2PxN1NQIhAiF6f9 DwDQeC/uJva3geU3vhGby8CJvuEF7ffug9BgHmw1nuFcJGjzDYFmPeeFJEpvjNsK+Ebu FtmSGDa4enFefNQoQmriGiy3YARh362UNKwR8TIkrr5dPC5NwCRyTwk8apv0DQzTpIlb xlviM30QzS+4WrqLcSWGO08o40m0szZvME2/iP9rYyFkft5oem9eBtLfMeuYa/FngcTQ HPi0Ec5eZ+lgxYgSwBls5Cwd2EwCZtZfiuSJKQQ+zbZXFgaepR6FgM8r727WmL7oUdBr kr+A== X-Gm-Message-State: AOPr4FUIHhRsVLlU3DtS5POTnOQBCN8SRr/zd5nVaMZhnx7ovWPwUxGq0dNjjAQ6NS9JQw== X-Received: by 10.194.20.6 with SMTP id j6mr14491801wje.118.1460623915780; Thu, 14 Apr 2016 01:51:55 -0700 (PDT) Received: from tiehlicka.suse.cz (nat1.scz.suse.com. [213.151.88.250]) by smtp.gmail.com with ESMTPSA id s10sm39935157wjp.3.2016.04.14.01.51.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Apr 2016 01:51:55 -0700 (PDT) From: Michal Hocko To: Cc: LKML , Andrew Morton , Michal Hocko , Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org Subject: [PATCH resend] crypto: get rid of superfluous __GFP_REPEAT Date: Thu, 14 Apr 2016 10:51:42 +0200 Message-Id: <1460623902-7109-1-git-send-email-mhocko@kernel.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1460372892-8157-19-git-send-email-mhocko@kernel.org> References: <1460372892-8157-19-git-send-email-mhocko@kernel.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. lzo_init uses __GFP_REPEAT to allocate LZO1X_MEM_COMPRESS 16K. This is order 3 allocation request and __GFP_REPEAT is ignored for this size as well as all <= PAGE_ALLOC_COSTLY requests. Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Michal Hocko --- crypto/lzo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/lzo.c b/crypto/lzo.c index 4b3e92525dac..c3f3dd9a28c5 100644 --- a/crypto/lzo.c +++ b/crypto/lzo.c @@ -32,7 +32,7 @@ static int lzo_init(struct crypto_tfm *tfm) struct lzo_ctx *ctx = crypto_tfm_ctx(tfm); ctx->lzo_comp_mem = kmalloc(LZO1X_MEM_COMPRESS, - GFP_KERNEL | __GFP_NOWARN | __GFP_REPEAT); + GFP_KERNEL | __GFP_NOWARN); if (!ctx->lzo_comp_mem) ctx->lzo_comp_mem = vmalloc(LZO1X_MEM_COMPRESS); if (!ctx->lzo_comp_mem)