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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B08FCD1712A for ; Mon, 21 Oct 2024 19:27:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1549A6B0082; Mon, 21 Oct 2024 15:27:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1057D6B0089; Mon, 21 Oct 2024 15:27:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F35E16B0096; Mon, 21 Oct 2024 15:27:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D308B6B0082 for ; Mon, 21 Oct 2024 15:27:08 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2E5AA81B04 for ; Mon, 21 Oct 2024 19:26:55 +0000 (UTC) X-FDA: 82698591822.03.0D395DB Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by imf28.hostedemail.com (Postfix) with ESMTP id 9DAABC0009 for ; Mon, 21 Oct 2024 19:26:51 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ZSl4XP+3; spf=pass (imf28.hostedemail.com: domain of aliceryhl@google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=aliceryhl@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729538750; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=G06bZX4NZYaGTrzKEnb+wzgfWTRjPnCRzAr7/SDwOJg=; b=uFpwJegsRTINUQrzo2Izn1o/x6WZ812TA24t0DKZq/DNe0LVU82A69HbumV31qjfX3vB2a k55g1g+4FFL4idYZJl1RZ9c4iao+n6SxmbhsdQAPCzFD0Fkp+dSQ3F497fXy6X+dGel4zg leLt7jb/RRyhBuxp9r2vUXNgg2cx2hY= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=ZSl4XP+3; spf=pass (imf28.hostedemail.com: domain of aliceryhl@google.com designates 209.85.128.54 as permitted sender) smtp.mailfrom=aliceryhl@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729538750; a=rsa-sha256; cv=none; b=56XMWTVMQAH2To3ZV7G7khByw6cLB2e//sk6CcSAloyq1Vh+z0xKs/blujmH0ggBmvt1Vi rVKnVWRymYNPNz7Lx55iw0mrNgIDMqk89Cx+icsSit6YE+NM/tRkejRjCTmiZhsWXRfV8S Sc/gJ5XmMncXtHlC2CCVJli59w0hUhk= Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-431695fa98bso23716995e9.3 for ; Mon, 21 Oct 2024 12:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1729538825; x=1730143625; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=G06bZX4NZYaGTrzKEnb+wzgfWTRjPnCRzAr7/SDwOJg=; b=ZSl4XP+3fCZN1g8LMZoDSTQ9mj+qIZHzUSjuzOQQVceg89JNuns1uWOS4PV/mVIaeS Y7Yvq1KFaiW76zhaJCc23MmpBFHgKf4ktiYEP6anhnMYqjY335XtUAovl6EjmeB+q6mC fYa70YrH1sIsVuRidBZxNsnJ6aSfUBAKqlnh095c7Lm4BjWA0G7F4dmhtDaCxiJeFai8 lFNluM48wxg1VaSXiJpEqAizCzKh16pdVGCqOoY4KdonVoU3edcsPnS/LlQGvgzGVe62 CIMKny/cWvgOkyF1i4OkYwk+FohZyNNPvVuvlieqm8WuCoEkrn+XFXAOBmMpTREQ1udG JvbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729538825; x=1730143625; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G06bZX4NZYaGTrzKEnb+wzgfWTRjPnCRzAr7/SDwOJg=; b=fzKO+2NVu43dncSYz6cHDDo9Jknavx1HKaSomHhKzPVtE5wAQHaHBR4Wuhupykjg+S uLjT7jgwKF9Pao03jKztxv1O5PcHd4o6KIBTCBEst8SYstt/LaNWFBdbzuxHok0AtCh3 wId0bmJZJaaV6gIwtYaNu80C777HtNuZQfvadP/lNC4c8MbP9n2180aA1+o0i8gp/Nv1 /MO7wXUx9EJ5IrOLjyKH+Ipp885j5jXioKUuz3mkcnXDPpIVofYuvGHTWbp500egdhei 2A2OhxwGmC1pvFYafKW5xkTsYMvu9rkWRHkJH6PhUNMjxD+Ff0WRudWRTRgEpuLBp71u mQ8g== X-Forwarded-Encrypted: i=1; AJvYcCXo1boZ4Rt+wV7h06kjKc2v+iA8+ymNgrKHBda1C6MvIeyDt90ygn0OQ4n+DLqAURcykkn0JYgFIA==@kvack.org X-Gm-Message-State: AOJu0YxLiYRT2OqKq2d2UCKzenlEWmdygXHMGn+sB10B7iCoIZp3L77g GAa3tpuKBX3PgbiIETrkZ6fRYSIcY1vi6dGIdDryXM9xpNiD5ihTXHkB0/FI0AoO5UGjo+rdTXJ b7ii0EtdQWiqak4DCpuFXZofC2Azhd0v/rWOZ X-Google-Smtp-Source: AGHT+IFjCfQpZXB5FfyR7n4mNoSlSW2stfPEZ5HGjgY7Qm6kIHo4Oefe2PJHKlWsVvPnmJG7vYibttMDHPYnP+AWtyg= X-Received: by 2002:a5d:6e56:0:b0:37d:4aa5:eae5 with SMTP id ffacd0b85a97d-37eb48a0ea5mr7193856f8f.55.1729538825298; Mon, 21 Oct 2024 12:27:05 -0700 (PDT) MIME-Version: 1.0 References: <20241016-page-align-v2-1-e0afe85fc4b4@google.com> <81e9b289-b95c-4671-b442-1a0ac3dae466@nvidia.com> <682c97a0-9877-4e31-b180-c1e38d3bc883@nvidia.com> In-Reply-To: <682c97a0-9877-4e31-b180-c1e38d3bc883@nvidia.com> From: Alice Ryhl Date: Mon, 21 Oct 2024 21:26:52 +0200 Message-ID: Subject: Re: [PATCH v2] rust: page: add Rust version of PAGE_ALIGN To: John Hubbard Cc: Alice Ryhl , Miguel Ojeda , Miguel Ojeda , Andrew Morton , "Matthew Wilcox (Oracle)" , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , linux-mm@kvack.org, rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam03 X-Rspam-User: X-Rspamd-Queue-Id: 9DAABC0009 X-Stat-Signature: q48ypxca1a7uouarxnzigrfrqiomjz16 X-HE-Tag: 1729538811-169531 X-HE-Meta: U2FsdGVkX1/Fi5S8vBKmJQCl6H3CeRxNQwxaFGIhRoy4YkpKqP4eeOB1MSbyi6uxV8WqHMg96a4LLiwhj4yK2rX+wtPylY0IAJcb5LSUE8EBkHQWAYJzw/BSJXO1xSngsnsjT8VoQU3fzWu+i1+N9m23tGTMyvu7mjPtvahKgo++/fM1JbuWRU0pQcOfDpz/tdVSqeD4uda3hSPZdTDw4ZuIcb2Do7da71iqOf8giaF5pRM5wJM0xd4cYYae84SobXq5qFAKuosUDwFIBcIkJp08TV7VFeGf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sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, Oct 21, 2024 at 9:09=E2=80=AFPM John Hubbard = wrote: > > On 10/21/24 11:59 AM, Alice Ryhl wrote: > > On 10/21/24 8:41 PM, John Hubbard wrote: > >> On 10/21/24 11:37 AM, Miguel Ojeda wrote: > >>> On Mon, Oct 21, 2024 at 8:35=E2=80=AFPM John Hubbard wrote: > >>>> > >>>> Is this another case of C and Rust using different words for things?= ? > >>>> Wow. OK... > >>> > >>> I am not sure what you mean -- by BE I meant British English. > >>> > >>> See my other reply as well -- I just changed it anyway because Rust > >>> apparently uses "parentheses". > >>> > >> > >> Right. For spoken languages, that's simply preference, and I would not > >> try to impose anything on anyone there. > >> > >> But in this case, at least for C (and, from reading my Rust book(s), I > >> thought for Rust also), "parentheses" is a technical specification, an= d > >> we should prefer to be accurate: > >> > >> parentheses: () > >> brackets: [] > >> > >> Yes? > > What word would you use to collectively talk about (), [], {}? In my na= tive language they're all a kind of parenthesis. > > > > Good question. I've never attempted that when discussing programming > language details, because it hasn't come up, because it would be a > programming error in C to use one in place of the other. And it is > rare to refer to both cases in C. > > Rust so far seems to have the same distinction, although I am standing > by to be corrected as necessary, there! :) > > At a higher level of abstraction, though, perhaps "grouping" is a good > word. Rust macros can use different types of brackets. For example, the `assert!(1 < 2)` macro uses round parenthesises, the `vec![1,2,3]` macro uses square parenthesises, and the `thread_local! { ... }` macro uses curly parenthesies. The round and square brackets are used for expression-like things, and the curlies are used for things that expand to top-level items such as global variables or functions. Macros cannot use any other delimiter than those three. So e.g. <> wouldn't work. Alice