Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhGgY-00AX1q-GX for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 22:21:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rhGgX-00BHFG-1D for pgsql-hackers@arkaria.postgresql.org; Mon, 04 Mar 2024 22:21:25 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rhGgW-00BHEp-Oc for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 22:21:25 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rhGgT-002rms-Bx for pgsql-hackers@lists.postgresql.org; Mon, 04 Mar 2024 22:21:24 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7c864b742e5so11036839f.3 for ; Mon, 04 Mar 2024 14:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709590881; x=1710195681; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=M+bQd6cCnoD+peUz4AismbnEcx1MKcYafLDmF1wUmQU=; b=R7ZA40CK3yTlNZaWLvlYcv4sxkKi/j1HEfgJ9Es/s0NHQZ6RGDYI8CZHMr6U/d/JL6 vMlFykjcfyhS+baTOMU9Kt0cZuYRv8mZDVmR8qxCv9I9eFI4dCNA41Skm2ovDAvET3qq EtTstBsMzRRDglOqBN42Th7MGG1ut0RLov4Rq5k72AMnDXS3KgJchFXcnlXFY7mCFl8W EBxLvn4bojeO+unR1LlyQcLVxmTB60dr+Udi8Aq2EkXaeo2HkuIu+13uH5JURg4NjPJj SMY2uKGIDhV+q2x2MB5ZvWoWuIMhoSZqq1xfCNf9wxrnhaBh27wQ9fIbXIyUOuuXXVoT 75Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709590881; x=1710195681; h=in-reply-to: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=M+bQd6cCnoD+peUz4AismbnEcx1MKcYafLDmF1wUmQU=; b=MeA+UZn3llwHWNhKV2Gmu/FnRwPZvZXaGhClRiLhNz0tAiagRjCGPku6TnwiXL60T0 J65wCFpYLaQ+ucbK4gKJsS5QiY7hNPC+WJLP/+wc7J+/XFnPcdVH+GEETMVoXmhaci2E F6om/E9aQDIbZp8Mf+pmi6xMjy1m4gHLL4ZB4vqMkx1ec748T9AUTRml5u7r8/q1U76n C63c2KTd7p8hS8zK0bYGhjapAhOEs5DBXXB0stnwmC9/ld7ZJR4Rf672JZTrynEXGTYN e0lJ2URMhur8NUxHLTkIb5cIpni/flgB4yI4LBG4CIfvYNn8b7NMzcbq8t3ToUFoYzLO HP6A== X-Forwarded-Encrypted: i=1; AJvYcCUEqTWPzI92l6RA0jruQsbBccn0sPxpsH3H+6KL0B5mte1AetRluH2xTf2cvUlWR7zD9lgzAMuQujYFdL7KaCwlb6AGYnYKrisE38CKuOfTQbno X-Gm-Message-State: AOJu0YyKYmMaVaxdrz7+knuupQbY0UAcUTLrlK4ztLbbMkOJ0o++qLMA CyT8Iy8rdP+ujQLwGyhH5RDvh9Y1anb27UWFBVSK2m2zS2Sdykzv X-Google-Smtp-Source: AGHT+IGZrPpv7qwgYJRU++hCUeyY7BF7aOp/hgI2PWNe1Ruod4lbE6Cuczi/LK+/1cvgNpd5QQf1lA== X-Received: by 2002:a5e:df09:0:b0:7c8:5476:80f3 with SMTP id f9-20020a5edf09000000b007c8547680f3mr4817854ioq.16.1709590881324; Mon, 04 Mar 2024 14:21:21 -0800 (PST) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id v13-20020a02cbad000000b00474fe4a0dbcsm153682jap.36.2024.03.04.14.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 14:21:20 -0800 (PST) Date: Mon, 4 Mar 2024 16:21:18 -0600 From: Nathan Bossart To: "Amonson, Paul D" Cc: Andres Freund , Alvaro Herrera , "Shankaran, Akash" , Noah Misch , Tom Lane , Matthias van de Meent , "pgsql-hackers@lists.postgresql.org" Subject: Re: Popcount optimization using AVX512 Message-ID: <20240304222118.GB3367383@nathanxps13> References: <202402071013.reqe3bdnjjuj@alvherre.pgsql> <20240209183450.snllkk7erharc73y@awork3.anarazel.de> <20240212203714.u4p7yeu7isuemmze@awork3.anarazel.de> <20240301214457.GA3024365@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk (Please don't top-post on the Postgres lists.) On Mon, Mar 04, 2024 at 09:39:36PM +0000, Amonson, Paul D wrote: > First, apologies on the patch. Find re-attached updated version. Thanks for the new version of the patch. >> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) >> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) >> +<< 31)) >> >> IME this means that the autoconf you are using has been patched. A >> quick search on the mailing lists seems to indicate that it might be >> specific to Debian [1]. > > I am not sure what the ask is here? I made changes to the configure.ac > and ran autoconf2.69 to get builds to succeed. Do you have a separate > feedback here? These LARGE_OFF_T changes are unrelated to the patch at hand and should be removed. This likely means that you are using a patched autoconf that is making these extra changes. > As for the refactoring, this was done to satisfy previous review feedback > about applying the AVX512 CFLAGS to the entire pg_bitutils.c file. Mainly > to avoid segfault due to the AVX512 flags. If its ok, I would prefer to > make a single commit as the change is pretty small and straight forward. Okay. The only reason I suggest this is to ease review. For example, if there is some required refactoring that doesn't involve any functionality changes, it can be advantageous to get that part reviewed and committed first so that reviewers can better focus on the code for the new feature. But, of course, that isn't necessary and/or isn't possible in all cases. > I am not sure I understand the comment about the SIZE_VOID_P checks. > Aren't they necessary to choose which functions to call based on 32 or 64 > bit architectures? Yes. My comment was that the patch appeared to make unnecessary changes to this code. Perhaps I am misunderstanding something here. > Would this change qualify for Workflow A as described in [0] and can be > picked up by a committer, given it has been reviewed by multiple > committers so far? The scope of the change is pretty contained as well. I think so. I would still encourage you to create an entry for this so that it is automatically tested via cfbot [0]. [0] http://commitfest.cputube.org/ -- Nathan Bossart Amazon Web Services: https://aws.amazon.com