From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74509C433E9 for ; Thu, 4 Feb 2021 18:25:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23A6664F45 for ; Thu, 4 Feb 2021 18:25:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23A6664F45 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=y6Z0a3RDbECYPajzX9ULkjMBIbHBrXsRQLJi+YNuaMg=; b=uqkcPj4reOROb5ptsFwu/Fqex DfkSWdW1M20+Ts6wN601cYbUVvAkNus6fLldrzAmsccW4qKxd29m8cfo6Cix82NAJ0UuPti68/Fhc O+KnYrFl1Xi5lMzz+jxzpbPSNiRBCp3It6gowPAmrXseDebfzjKT5ZwByvKksyo7oBPS3+W/U5GEy FPUbXUiK72QUtNaaZhpAjzdebkI0hfDUvQQT6ylkYstzP/mgGmCLBgxBEJeXkxurNxiBRogGpK8bM WL3X6JMxmroApaIlPBeJNSx6d2lLWG6q/OA4y9beh2QbYb4QjitKtB9ozLBlTEmF8ORFt6Gc8qxGx DD8YqKUzg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7jIc-0000wo-RP; Thu, 04 Feb 2021 18:24:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l7jIa-0000wA-ED for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2021 18:24:13 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6C14564F45; Thu, 4 Feb 2021 18:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612463051; bh=dn4Y26xu9vyOVgTk8Xpb97T9X87MClTDWTRp/3WldJo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uwitVKbjRGW6MhrPvbGIAjt5Wrs616/BcrBjh6KRmE00R3ZOvoqrjrliGcQ6njHrC vj9ZIHQX9AQv0Yk/TQh0joJrkcWCLRkfs3vc3fi2G4gZZCCCqUSYIHMNigLJhcQoF/ TMcWQv6Me0kyb9AHBKXMLyJmYcbgrMm/7hMwYndMdIG4lQpBT8MMwQbUXg8CFRjQEa xld8kqfkXg8cmyd4jEwfdexlmKZ5XoHRgywfnDc4UbrJEsnBltlqHInA+tNGauoXgT 6sxqBBtVylwFvh+Em/z/lkKk1TDJlulCpsCDOSZ/a4wiXww5NkMABkgNVxzkfoa+w0 VQ84Fng81mg9Q== Date: Thu, 4 Feb 2021 18:24:05 +0000 From: Will Deacon To: Quentin Perret Subject: Re: [RFC PATCH v2 12/26] KVM: arm64: Introduce a Hyp buddy page allocator Message-ID: <20210204182404.GB21526@willie-the-truck> References: <20210108121524.656872-1-qperret@google.com> <20210108121524.656872-13-qperret@google.com> <20210202181307.GA17311@willie-the-truck> <20210204143106.GA20792@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210204_132412_552438_2CA11EED X-CRM114-Status: GOOD ( 13.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, kernel-team@android.com, Suzuki K Poulose , android-kvm@google.com, Catalin Marinas , Fuad Tabba , linux-kernel@vger.kernel.org, Rob Herring , James Morse , linux-arm-kernel@lists.infradead.org, Marc Zyngier , David Brazdil , Frank Rowand , kvmarm@lists.cs.columbia.edu, Julien Thierry Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 04, 2021 at 06:19:36PM +0000, Quentin Perret wrote: > On Thursday 04 Feb 2021 at 14:31:08 (+0000), Will Deacon wrote: > > Just feels a bit backwards having __find_buddy() take an order parameter, > > yet then return a page of the wrong order! __hyp_extract_page() always > > passes the p->order as the order, > > Gotcha, so maybe this is just a naming problem. __find_buddy() is simply > a helper to lookup/index the vmemmap, but it's perfectly possible that > the 'destination' page that is being indexed has already been allocated, > and split up multiple time (and so at a different order), etc ... And > that is the caller's job to decide. > > How about __lookup_potential_buddy() ? Any suggestion? Hey, my job here is to waffle incoherently and hope that you find bugs in your own code. Now you want me to _name_ something! Jeez... Ok, how about __find_buddy() does what it does today but doesn't take an order argument, whereas __find_buddy_of_order() takes the order argument and checks the page order before returning? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel