Received: by 10.213.65.68 with SMTP id h4csp1681603imn; Thu, 15 Mar 2018 06:45:25 -0700 (PDT) X-Google-Smtp-Source: AG47ELvc4bCP2IzSaTNBRz8VmrCE/STAc0O1ZBcr/I/Q97YePGGVwDznVBghjfI2eUk+C98U0JTP X-Received: by 10.99.124.2 with SMTP id x2mr6885790pgc.262.1521121525378; Thu, 15 Mar 2018 06:45:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521121525; cv=none; d=google.com; s=arc-20160816; b=M8K7TJs98B72+g0edqJO4+7jK6tqQrdL7Lyzsaaqgblja6Y2p3kHnj6KxF6YasBA9G oeT9TBbp4Qm/trfetNSmQDYvc2+w6Hpevs9MHGY5qshfiVf/JdXzdLd7oS2e3I2l2Wh1 ezzHqzp1h7DSwZFjqe9rZBcRwMDKJPz6SjKiwC5OgcjKighusMfTV013jFETJs5sjlNS ouF98W56+1G4ntcIV5rDSCas69DNppE35bBwGKyEMmk1GWWbCIRKXDlHLh8308OhgCJ0 dkKBXfDRIqqSimmbDSkXy1JsKOEutoYrOqqgekQSCrPB4cjaAPlFR1mfvEGPhpHF5OWm djmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=mhzmoVQIKxpTlzndIFNjuvLSvWIFosd4AzwrRb6B744=; b=bnmjqKqAjxDfYAzCLDTHP4evJtzr1R9hQRE3ANGvBdOO1zJuMfhRML/3zgP21MMsBy WJqPQHnAdW8Cr+r51eEdKGTJbhITHpCPUin1997HgrH3JREN9AGbN6cXtJH51oze8ixn yUK707goK7tCBDX0ljwi2xJMD507eOr1irpwu3YH63kCx4T3o3ITDPzFg1SPi3oDTOTb fTB4Tutu85M76k2evLo7I+1myldIYxowDu7shs0yE3uplDxFSTWU2LYSwoOOQ1hka+aH +3k0tePzq3Whsk2XQQffMt6KUw3ZVjO4U7Y0G8pC3gEQF07dem1N7L1/Ro2SchohVqjy f2Vg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u11si3380189pgv.280.2018.03.15.06.44.56; Thu, 15 Mar 2018 06:45:25 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbeCONnz (ORCPT + 99 others); Thu, 15 Mar 2018 09:43:55 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:29596 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751679AbeCONny (ORCPT ); Thu, 15 Mar 2018 09:43:54 -0400 Received: from LHREML713-CAH.china.huawei.com (unknown [172.18.7.107]) by Forcepoint Email with ESMTP id 2E79FB004FA5B; Thu, 15 Mar 2018 13:43:51 +0000 (GMT) Received: from [10.202.185.64] (10.202.185.64) by smtpsuk.huawei.com (10.201.108.36) with Microsoft SMTP Server (TLS) id 14.3.382.0; Thu, 15 Mar 2018 13:43:50 +0000 Subject: Re: [RFC PATCH v19 0/8] mm: security: ro protection for dynamic data To: Matthew Wilcox CC: , , , , , , , , References: <20180313214554.28521-1-igor.stoppa@huawei.com> <20180314115653.GD29631@bombadil.infradead.org> <8623382b-cdbe-8862-8c2f-fa5bc6a1213a@huawei.com> <20180314130418.GG29631@bombadil.infradead.org> <9623b0d1-4ace-b3e7-b861-edba03b8a8cd@huawei.com> <20180314173343.GJ29631@bombadil.infradead.org> From: Igor Stoppa Message-ID: Date: Thu, 15 Mar 2018 15:43:49 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180314173343.GJ29631@bombadil.infradead.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.202.185.64] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/03/2018 19:33, Matthew Wilcox wrote: > On Wed, Mar 14, 2018 at 06:11:22PM +0200, Igor Stoppa wrote: [...] >> Probably page_frag does well with relatively large allocations, while >> genalloc seems to be better for small (few allocation units) allocations. > > I don't understand why you would think that. If you allocate 4096 1-byte > elements, page_frag will just use up a page. Doing the same thing with > genalloc requires allocating two bits per byte (1kB of bitmap), plus > other overheads. I had misunderstood the amount of page_frag structures needed. -- igor