Received: by 10.223.185.116 with SMTP id b49csp1488356wrg; Sun, 11 Feb 2018 13:19:01 -0800 (PST) X-Google-Smtp-Source: AH8x227pzKoFO7LMdZ7gGCT6SuuFDpfKTiBSh6ldVCUo2i7EolMwiSsCZeu7glOsZJeIgV9ZC8ch X-Received: by 10.98.74.20 with SMTP id x20mr9715246pfa.191.1518383941830; Sun, 11 Feb 2018 13:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518383941; cv=none; d=google.com; s=arc-20160816; b=IjNP8Zg10+b61/tSSnP3o+W413P7H5v6N636SpfQ9162YgHtu9h3s1US8T+bvhLg0V w/VTLW/iNHV+Ioq3zG8/oAOXefWNymr49Cxa30Gu81KrZ3f4CTTpDSRjjf/R9Hz7RGi4 PWnlVTvntk9cHmeUnPyzHISEo7DmHiKlyINddPjV0uJZwSnJsEnh1c1WIIu1JhVYqu0u UL5RRCXelTpygTg5zDKQYaP55+EgHMg8dav6GI1zOV/1Gp+uT4mOgXNHGHWdyPcc6wGk sYdZj3zWfJxn80IRRAGMpbx+42aD90cMjBelgrrTVGspurL91yksT1loHjjn8JI9NQAN LHPA== 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:dkim-signature:dkim-signature :arc-authentication-results; bh=mBpc17LLwiDNwRgABOvWpiJUFe13nXutLLBAQmp+5yI=; b=zypKYHrwx7ChvfplUP3Z55Li/58l1Szjxgqn+01MRWQEvNP2839jvoMrFKI8Np153p sFX/hl9LXLXjnBqxLcyrupN+eqWUvSFDo78JP1Phhkuy9d3XPxJKKsgG48YeSmixbUUc jRGAm1dWls43enPZMr6CSeuVjSlRayFUM3BQnbl549nUkNlXFTd34MWEr340DyZT77G4 7JeAQhvf8gQ7syxlfdVW5fNPQbcoARib9DbXtJE/3QSitIM9T4ZQc85bSRVn9Jt+++Bl SQ+qEgEhnk8ZiTIMEcAs4bz3gTx/1L7qRmohcxLuIERsWs8QzfybaH4LBVP/NoJ7epIO 3Jlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=VAG3pda5; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZBzYfrDM; 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 j9si4668971pff.232.2018.02.11.13.18.46; Sun, 11 Feb 2018 13:19:01 -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; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=VAG3pda5; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ZBzYfrDM; 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 S932178AbeBKVSI (ORCPT + 99 others); Sun, 11 Feb 2018 16:18:08 -0500 Received: from casper.infradead.org ([85.118.1.10]:48890 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753669AbeBKVSF (ORCPT ); Sun, 11 Feb 2018 16:18:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mBpc17LLwiDNwRgABOvWpiJUFe13nXutLLBAQmp+5yI=; b=VAG3pda5jzhvjxke1VHQh3+Lp kpDTW6+q9LKVbt8vSpwpDW/6PqrTRrdKVv0/BBUzbc9M78F9Pf0B+5unaXn/1U3txM5I387wDU+1j A3OhvekpghJM3O8FJw3GvPL9mewEoceMws4JVW3ls2AdCM17osZguMJCxfJS1BabD3c+x2F2B9qLG as/HNUdNtJcfPXQl8gyf4Ow1e5oAFxRWGf2II0G1OJ28rlla8L/xJUgiMihcuTMJ7hsbS3sMEdVmT 63hT4takGV0P3fGRuWimjQChXK2X8X0WiGb5KjfS5G8reRHe88i9pTjko5FGAypGT8y5u2RMiDhVq yYLFBucIQ==; Received: from [198.137.202.133] (helo=bombadil.infradead.org) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekz0O-0002NO-3u; Sun, 11 Feb 2018 21:17:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mBpc17LLwiDNwRgABOvWpiJUFe13nXutLLBAQmp+5yI=; b=ZBzYfrDMoSA6nZ/ghGd08yX/B 7RXvre3CRBZmvd7nnOEVx8Howpdophg5ge8DNpoOGr9LUzNXewIrOXMhVvuoe+mQZwT3/F/DtHmTZ B4PySm9MfI64eqoRq85KQE3ZJ5+uazUV3q3M2wji2AyNVHpYQvo9HGxExHcQge6a3W9fs4Jievl2f YUsjWTs8mKhb0QD7eZe88+DiLTcET8Wcb8SsbW78p/qog7sbEueTDNss6lAta/OEjyrQyjWiiopDh BF0PeNhK760WWG96BlZRWTv/gqXvsCaoLGn6LhCTQXW41EADhGaqO3aUJjloIVvEnkh3q7cDmOJJX w9Y8wHfGA==; Received: from willy by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1ekyzO-0002IZ-DZ; Sun, 11 Feb 2018 21:16:46 +0000 Date: Sun, 11 Feb 2018 13:16:46 -0800 From: Matthew Wilcox To: Igor Stoppa Cc: rdunlap@infradead.org, corbet@lwn.net, keescook@chromium.org, mhocko@kernel.org, labbott@redhat.com, jglisse@redhat.com, hch@infradead.org, cl@linux.com, linux-security-module@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-hardening@lists.openwall.com Subject: Re: [PATCH 3/6] struct page: add field for vm_struct Message-ID: <20180211211646.GC4680@bombadil.infradead.org> References: <20180211031920.3424-1-igor.stoppa@huawei.com> <20180211031920.3424-4-igor.stoppa@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180211031920.3424-4-igor.stoppa@huawei.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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.