Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp672150imm; Wed, 13 Jun 2018 06:41:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL+jNrayvbHwFDyEmzDVaP7cZYaJny9ZmgkecPw3odPFvg7edgCOc1eidRhB1dKM7ZINoSe X-Received: by 2002:a17:902:d697:: with SMTP id v23-v6mr5221351ply.193.1528897278710; Wed, 13 Jun 2018 06:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528897278; cv=none; d=google.com; s=arc-20160816; b=IIRVosTrJeMfRYN+odOxCMCwAclzPAvml88uCsbesGIVQ3t9dfHWj3Ta06xB/pUfSE eQA+T23tU8j/TkW8UOrJWf1PsivqdThoUjR6cMC7xA6PfqsoIIpMshDssemmny6zepUW 4DqPwbj3BMsnWS/z3hGR4893ZTeIZ80rojPMsBKQvlO2jzPPVpyVAre1h/RczG0X7liC 93OgVBRh6qj/+LVL+UocdjIZM8lWV5wkj1Yx1L0UWUadXeOAufQTeW3tFpwJ5TdJ6ceF gMGLbeJ/yudCJZA7CG6rfQo9dFAYm+nBfvfw7H0iNPaCnfMOnPvAJ/LvyY++QmMGf20v csAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=AfKw5kmByQs4l6RRMpeDR5N5RnBn9roMisHhs7B9r/Q=; b=Tlwj+VUfs6/Ug+DjtWFvpWvUYVTx4kAUJSF7p5yJBPB1HXOEYfc2ifh+WHygX1oFQ0 1lSlWz4DKCUTiHBR+DeE9Vo1kaEhOMy0FFxjEX94HSTGJ+MtNl/jmFr8Nv310/5dHYo0 xNmDoAYvUCofoOAVVYPQJauW3xTdJW6Xb6Eh38GG6HzZQSs0j5GpkYidEjmml7UH9K7s W2Cxjm6uXLpQkG1D4b+RRClWNd5/irNawmaVbAK9TglgJa29xXEZhJ/0mL0cDSssicTA EknY/IS7PMjvhj11lh7UjQpqHsxIx/AEVJa1H4q4NRbanVWzK+3M9elGHhhuI/NadwUV 8NkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 29-v6si2850544pfs.40.2018.06.13.06.41.04; Wed, 13 Jun 2018 06:41:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935481AbeFMNjS (ORCPT + 99 others); Wed, 13 Jun 2018 09:39:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:46943 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934987AbeFMNjR (ORCPT ); Wed, 13 Jun 2018 09:39:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0AC38AE1B; Wed, 13 Jun 2018 13:39:16 +0000 (UTC) Date: Wed, 13 Jun 2018 15:39:13 +0200 From: Michal Hocko To: Christoph Hellwig Cc: Marek Szyprowski , Matthew Wilcox , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andrew Morton , Michal Nazarewicz , Joonsoo Kim , Vlastimil Babka Subject: Re: [PATCH] mm: cma: honor __GFP_ZERO flag in cma_alloc() Message-ID: <20180613133913.GD20315@dhcp22.suse.cz> References: <20180613085851eucas1p20337d050face8ff8ea87674e16a9ccd2~3rI_9nj8b0455904559eucas1p2C@eucas1p2.samsung.com> <20180613122359.GA8695@bombadil.infradead.org> <20180613124001eucas1p2422f7916367ce19fecd40d6131990383~3uKFrT3ML1977219772eucas1p2G@eucas1p2.samsung.com> <20180613125546.GB32016@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180613125546.GB32016@infradead.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 13-06-18 05:55:46, Christoph Hellwig wrote: > On Wed, Jun 13, 2018 at 02:40:00PM +0200, Marek Szyprowski wrote: > > It is not only the matter of the spinlocks. GFP_ATOMIC is not supported > > by the > > memory compaction code, which is used in alloc_contig_range(). Right, this > > should be also noted in the documentation. > > Documentation is good, asserts are better. The code should reject any > flag not explicitly supported, or even better have its own flags type > with the few actually supported flags. Agreed. Is the cma allocator used for anything other than GFP_KERNEL btw.? If not then, shouldn't we simply drop the gfp argument altogether rather than give users a false hope for differen gfp modes that are not really supported and grow broken code? -- Michal Hocko SUSE Labs