Received: by 10.223.185.116 with SMTP id b49csp2363941wrg; Mon, 12 Feb 2018 08:25:46 -0800 (PST) X-Google-Smtp-Source: AH8x227m8WUDeAJOKtE9dEAkKMXCr9f2midQgyygeZMwPm7HxWjGXinE10Z7jtyOxju/MxfgOnPz X-Received: by 2002:a17:902:7b94:: with SMTP id w20-v6mr3369828pll.195.1518452746536; Mon, 12 Feb 2018 08:25:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518452746; cv=none; d=google.com; s=arc-20160816; b=FNVX+NMFnSRnZBqA4QtC4A9Vpk1rT7z2+Ic5j4Nh2UvAM2IaPtDh/AWhJxIxINtVRE asF4ljxnhfLScAdyvCDZDpJWjdGn0q/NeReUjPtzPosKmRkCIhqhsYJht1fa4XKkdFBE blci+LXlGhmSC+uuF8XIshis6eJeEsSGHAv7/p4MKCFt506/Bp1u8RxjDUFKzqxVa0lv c0sYB3/o5iGwDHBLRrpLuAVyjNh4DLSREv4a9V1r3STC6EdiWfjGDS6I6Nd6smrTinHP GajQ2rtV2tsb2/j71oxNrJy4mjJfH/A6Zjw7luazvQGo5jWODAqVya+oGJNrzt0mHu9b sa+A== 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=mPXLQBw9Xzd2EluGDK+Ax01O17bfJX3ttLxVN7FLmA4=; b=iB8xACLmC2J/D+GTg9a+yquLsmghthpBA9QBcgWHZjzjecwa4uRE207JlHLS7fSpgi PHjdQ0lSfyJDuU6MKmNj3E8miCL9S3rPBPI6W3RyaAOz5lpgPCrJrcapJwa5/JDoyg3a vernAyo6eHb2AhEKvVYSUK0jXszlTnnLww44QtB3PDJT3s07uuSez2n/aCzqNnAjiuqH YZM4QOm2VqB5n6eYuPzWwZ4h3+ypScme8mPLl2xHuH5CHEkXuzmkeloXSIQnzMMprUAF /n5EGrRA6oBk8Z94mfOW5F4XygM38BH/JafBMO7U2tS28Im56FZyJfIjpONkGFy3h2zW xW+A== 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 88-v6si5921141pla.342.2018.02.12.08.25.31; Mon, 12 Feb 2018 08:25:46 -0800 (PST) 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 S964930AbeBLQYn (ORCPT + 99 others); Mon, 12 Feb 2018 11:24:43 -0500 Received: from lhrrgout.huawei.com ([194.213.3.17]:26207 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964875AbeBLQYm (ORCPT ); Mon, 12 Feb 2018 11:24:42 -0500 Received: from LHREML712-CAH.china.huawei.com (unknown [172.18.7.106]) by Forcepoint Email with ESMTP id 8FD6FE296AF40; Mon, 12 Feb 2018 16:24:38 +0000 (GMT) Received: from [10.122.225.51] (10.122.225.51) by smtpsuk.huawei.com (10.201.108.35) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 12 Feb 2018 16:24:35 +0000 Subject: Re: [PATCH 3/6] struct page: add field for vm_struct To: Matthew Wilcox CC: , , , , , , , , , , , References: <20180211031920.3424-1-igor.stoppa@huawei.com> <20180211031920.3424-4-igor.stoppa@huawei.com> <20180211211646.GC4680@bombadil.infradead.org> From: Igor Stoppa Message-ID: Date: Mon, 12 Feb 2018 18:24:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180211211646.GC4680@bombadil.infradead.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.122.225.51] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/18 23:16, Matthew Wilcox wrote: > On Sun, Feb 11, 2018 at 05:19:17AM +0200, Igor Stoppa wrote: >> The struct page has a "mapping" field, which can be re-used, to store a >> pointer to the parent area. This will avoid more expensive searches. >> >> As example, the function find_vm_area is reimplemented, to take advantage >> of the newly introduced field. > > Umm. Is it more efficient? You're replacing an rb-tree search with a > page-table walk. You eliminate a spinlock, which is great, but is the > page-table walk more efficient? I suppose it'll depend on the depth of > the rb-tree, and (at least on x86), the page tables should already be > in cache. I thought the tradeoff favorable. How to verify it? > Unrelated to this patch, I'm working on a patch to give us page_type, > and I think I'll allocate a bit to mark pages which are vmalloced. pmalloced too? -- igor