Received: by 10.223.185.116 with SMTP id b49csp277385wrg; Sat, 10 Feb 2018 06:58:48 -0800 (PST) X-Google-Smtp-Source: AH8x226EmlEySuAEBZAAX8yUVcN0OeWteRmF1GWJyl29yGVkyzzHEZx+BUwYES8MPy46DtCieTjG X-Received: by 10.98.108.133 with SMTP id h127mr6352089pfc.50.1518274728887; Sat, 10 Feb 2018 06:58:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518274728; cv=none; d=google.com; s=arc-20160816; b=WphvSaWDgyURL+e9Sn6g4MMRUwBX3mj12avaa7iGmWLU5CJxta7/snEV+Hi6mfkfjQ iVEyuXKSq20WuWUd9q3F9L7ery+Doa+zh14ks1KsJMmxkb3oghjD/eI0hhZ0Qr7GyDmW 8Q+LPf3HFjCUoxUSR/RHTWVXRznEcDS0K4r0XphxdiXUKZVhokTh2IgsNyWu8LF0igkg sdSsBV4C68vZp4ji1hkpNiETGeNqhFxceMgvy22cVzhpTM+XrW0sX1cf1wPnmasWIfXl uU8kc9PXok+k5cloDs7wYzTYbIjpIPZ/q9IcK2xmwoazMUL+DZhHEal13BkgKUBRYUEn ccsQ== 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=oN1qGpAyvsQB8Phe6fvGligDBDLZvZp4vgY5QHqetgI=; b=VPgvVYK09rFxZXXorSL8ZGfajFJrnY3yis1vg6obFZpi7iUOSYEUEb5nVv/jcMYZZK IdI0L7WTEs75WkbI/cLlQxnwtZvbSWt0JzvBXIR40fsgZ9g3vNuh/kajwEjuoHyQOpmS KGhDKyN+yeybyMou6tL1rZpSfJCNQIqqhLOOk5X7szDDszv6MZnXWTTv+R/sBZE3p1H5 IJpe9eQUcrhyzcKiuMWz2O2bML9lpt1IW2n9qho3xaEoOWc30uelD1HF0Pt3FgNyKlaH YAIlaWn+atzxWItSrrPGOHisx7YBVv8exBINXiiBuaQEpeK6NRiZxGxH9jEcHFJhuY7+ ty7w== 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 e3-v6si1447238plk.542.2018.02.10.06.58.35; Sat, 10 Feb 2018 06:58:48 -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 S1751055AbeBJO53 (ORCPT + 99 others); Sat, 10 Feb 2018 09:57:29 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:6831 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750835AbeBJO52 (ORCPT ); Sat, 10 Feb 2018 09:57:28 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zdw5K4YxHz9ttS1; Sat, 10 Feb 2018 15:57:25 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id fFTEhObq4_94; Sat, 10 Feb 2018 15:57:25 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zdw5K3s8lz9ttRy; Sat, 10 Feb 2018 15:57:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id BB44B8B888; Sat, 10 Feb 2018 15:57:26 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id pIGlmpy9aLqc; Sat, 10 Feb 2018 15:57:26 +0100 (CET) Received: from PO15451 (unknown [192.168.232.3]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2F8EA8B883; Sat, 10 Feb 2018 15:57:26 +0100 (CET) Subject: Re: [PATCH v4 1/5] powerpc/mm/slice: Remove intermediate bitmap copy To: Nicholas Piggin Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Scott Wood , aneesh.kumar@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <01e8f783db8f4d4d41df91e0400a8634272b326f.1518226173.git.christophe.leroy@c-s.fr> <20180211004309.2eda56a3@roar.ozlabs.ibm.com> From: Christophe LEROY Message-ID: <501bab56-c389-87c6-8d90-24b5b9fd5e67@c-s.fr> Date: Sat, 10 Feb 2018 15:57:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180211004309.2eda56a3@roar.ozlabs.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 10/02/2018 à 15:43, Nicholas Piggin a écrit : > On Sat, 10 Feb 2018 13:54:25 +0100 (CET) > Christophe Leroy wrote: > >> bitmap_or() and bitmap_andnot() can work properly with dst identical >> to src1 or src2. There is no need of an intermediate result bitmap >> that is copied back to dst in a second step. > > Everyone seems to be working on the slice code all of a sudden. I > had the same change in my series I just posted, but I didn't notice > this one of yours earlier, and it's better split out, so this is > fine by me. Thanks, I had a quick look at your serie, it looks promising. The main purpose of mine is to allow the use of slies on the 8xx in order to fix a hugepage related bug. Your serie is performance oriented and seems nice, indeed I should have noticed that it was passing huge structures instead of pointers to subfunctions. I will look at your serie more in details next week. Christophe > > Reviewed-by: Nicholas Piggin > >> >> Signed-off-by: Christophe Leroy >> Reviewed-by: Aneesh Kumar K.V >> --- >> v2: New in v2 >> v3: patch moved up front of the serie to avoid ephemeral slice_bitmap_copy() function in following patch >> v4: No change >> >> arch/powerpc/mm/slice.c | 12 ++++-------- >> 1 file changed, 4 insertions(+), 8 deletions(-) >> >> diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c >> index 23ec2c5e3b78..98b53d48968f 100644 >> --- a/arch/powerpc/mm/slice.c >> +++ b/arch/powerpc/mm/slice.c >> @@ -388,21 +388,17 @@ static unsigned long slice_find_area(struct mm_struct *mm, unsigned long len, >> >> static inline void slice_or_mask(struct slice_mask *dst, struct slice_mask *src) >> { >> - DECLARE_BITMAP(result, SLICE_NUM_HIGH); >> - >> dst->low_slices |= src->low_slices; >> - bitmap_or(result, dst->high_slices, src->high_slices, SLICE_NUM_HIGH); >> - bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH); >> + bitmap_or(dst->high_slices, dst->high_slices, src->high_slices, >> + SLICE_NUM_HIGH); >> } >> >> static inline void slice_andnot_mask(struct slice_mask *dst, struct slice_mask *src) >> { >> - DECLARE_BITMAP(result, SLICE_NUM_HIGH); >> - >> dst->low_slices &= ~src->low_slices; >> >> - bitmap_andnot(result, dst->high_slices, src->high_slices, SLICE_NUM_HIGH); >> - bitmap_copy(dst->high_slices, result, SLICE_NUM_HIGH); >> + bitmap_andnot(dst->high_slices, dst->high_slices, src->high_slices, >> + SLICE_NUM_HIGH); >> } >> >> #ifdef CONFIG_PPC_64K_PAGES