Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7333727rdb; Wed, 3 Jan 2024 12:09:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1HoanC+2KQjS99jHH3lWDjjYC+Piziq5qWJQdt1rQLcQKfp9qb69NbXKJiuO7BkFKw8vO X-Received: by 2002:a17:902:e884:b0:1d4:ca52:8d9f with SMTP id w4-20020a170902e88400b001d4ca528d9fmr2659586plg.135.1704312543585; Wed, 03 Jan 2024 12:09:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704312543; cv=none; d=google.com; s=arc-20160816; b=m2xP+3O93ZtPpoRwSCjB/UMwG5D/T9aBgkJF3ALbLRGJhiMuBApGiHVHUlDksRMdUR Y8SsA+LTuEjn3ZaKK2AtwTbcxnNyBL/GRoLJhgeeWhcI+cscA9DRfBJjc6vpCn/rQIUi 88k2QYtxagtjrI6rwy282yhwMdG+luiC6diGbZzNxDhaOBwCdIbJY+yNIyYkXVKGoV3N MAS2OENtQn5NSC3/FH9mZ6USSQKHGpfdsNGcKMMrw5WlKmi0FCAX0VLjZBHQp2jHrTOZ aP0j2LU8xoh23NnU6QC7bjzrPuF1MrUcbphjo5uIC2yULAC0gEaxopJ8Y2BKdcz371Eu uQow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZbXC5eCmmqFTARmpyDuedcNTwdQFCtXDKnroQ3f3H6o=; fh=0T0xntDiKoeVmt8t2zfTptaICTdM6Z2gBcAQ6l32qjU=; b=NTF8mIxTCmAKXCIpd692fPmbZEysECxoNQ7wI8JCpieTyp8RRBfFODMcjQs9nS2OuX Xy6/MGACzKyfivbqHFDsL5OtqanaLf843k0HXp1l26KxlPCQUUH9XE+02ry3axr5vT54 9ag+QeLP2F13xH7Sj/W+Ofcyy48WeJuG8Vbw2pJVY5iX03dRU0wGgZGF6Muzf9uToCmA XbsfG9fjSnfIRmK4b4NxvVMyNr3Bz5+/8fGkesaiPm9XPCAHcDDgfUsR6BP+BQQbtTpY ATRbpnQyCflw1CXnosvYsD0w8JNaX1KAgUFssUgemnxWgeDmmgEo9Q8j17GDV764tSoq x7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XK8FdQRd; spf=pass (google.com: domain of linux-kernel+bounces-15951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15951-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c19-20020a170902849300b001d496d21086si9415462plo.500.2024.01.03.12.09.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 12:09:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-15951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=XK8FdQRd; spf=pass (google.com: domain of linux-kernel+bounces-15951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-15951-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 10AB3B232A3 for ; Wed, 3 Jan 2024 20:08:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4749E1CFBE; Wed, 3 Jan 2024 20:08:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XK8FdQRd" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B1A51CFAD for ; Wed, 3 Jan 2024 20:08:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-28c5af37d3aso1917597a91.0 for ; Wed, 03 Jan 2024 12:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704312529; x=1704917329; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=ZbXC5eCmmqFTARmpyDuedcNTwdQFCtXDKnroQ3f3H6o=; b=XK8FdQRddv8dGDTR1terofZteJ3QHeqR+b3/Nvx0iq+WEAAIBXY1zFDs6h5sXsD+0F //kINYySjm0DyDMWg44jCVKfiotniTseQi/ja8s/VbIqh9DVNrTU5wtOm75PtkIZAdAn uqm8FrpjQVbFCls9M3olItQObFujNl3q5DpEhEJwL0M22MWeZSiRpO9AaAV3iHLwhIqI 0K+f1429nr3YAEECQ09s6AcAKvzu4fiP21PEN37FZsKw2+CbNix8DILLIrckiQb7SHEq tqDPIsbzHrvaz2aPWIjZd7E5p5La4b5um/l5MgUPhQjr1mxsGcdiDgiYfzW9OzzSSNUG o2Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704312529; x=1704917329; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZbXC5eCmmqFTARmpyDuedcNTwdQFCtXDKnroQ3f3H6o=; b=cNL4vtJDpSHFOJqqjZ6h2SV/b//H3JHsJ7YrmOKZHRVbPGVd3mLGwuZjrl6AU3nJa8 kFPFdaKDM2zJxW+MM7apObAxDQezAOj0HDkvXv2XphF3FJ7gfvNeYBmvpl5gl5ef0xhT dJAvaiLsJ1/UjX47anDdWCHtGp2tu3HTaVGxiPRkddyvhHPHr3kwZbvSVFQAtF/INggu lcxK72IDsKWJU/paTE1eX7tdobwns87JPGtEsHlSBKKosQtLcldbF/rquvniCkfTOJrB JjiWmsytPk0hCt6cnx8HWtdHaWCD5sHi0IC9hiBVOyhr0dlGBWhutIqVkc3SL+s2uF3r ndRA== X-Gm-Message-State: AOJu0YyFunaJvvSodt4nwjt8QI+RKsM2vADRqOjOqXq/s5vWr1k6VDUK /7tUfKc6NPf1SMuKqx2Zs2y025gUD2E= X-Received: by 2002:a17:90a:71cc:b0:28c:c24d:165d with SMTP id m12-20020a17090a71cc00b0028cc24d165dmr9719579pjs.1.1704312529402; Wed, 03 Jan 2024 12:08:49 -0800 (PST) Received: from visitorckw-System-Product-Name (IP-216-168.cs.nctu.edu.tw. [140.113.216.168]) by smtp.gmail.com with ESMTPSA id ca13-20020a17090af30d00b0028acb86f7b5sm2214914pjb.44.2024.01.03.12.08.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 12:08:48 -0800 (PST) Date: Thu, 4 Jan 2024 04:08:45 +0800 From: Kuan-Wei Chiu To: Ian Rogers Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] min_heap: Min heap optimizations Message-ID: References: <20231220083224.3712113-1-visitorckw@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Wed, Jan 03, 2024 at 09:56:29AM -0800, Ian Rogers wrote: > On Wed, Dec 20, 2023 at 12:32 AM Kuan-Wei Chiu wrote: > > > > Hello, > > > > The purpose of this patch series is to enhance the existing min heap > > implementation. The optimization focuses on both the heap construction > > process and the number of comparisons made during the heapify > > operation. > > > > Kuan-Wei Chiu (2): > > min_heap: Optimize number of calls to min_heapify() > > min_heap: Optimize number of comparisons in min_heapify() > > Thanks Kuan-Wei, > > The patch series looks good to me. Given the extra conditions should > there be some updates to: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_min_heap.c > to ensure coverage? > Hi Ian, Thank you for your review. The current min_heap test is sufficient to cover all the code changes introduced by this patch series, even when only tested with a known set of values copied from the data. Additionally, I'm unsure if the commit message title prefix I used is correct. Perhaps I should use "lib:" instead of "min_heap:"? Best regards, Kuan-Wei Chiu