Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2212872ybv; Fri, 14 Feb 2020 13:48:13 -0800 (PST) X-Google-Smtp-Source: APXvYqzOuY6YtrURzaLNp3KzKJwo6KP+9Cv0g7b0yTbpeLLTO6tGC5rIrna7v9MWsD/ms6RprYr4 X-Received: by 2002:a9d:7a47:: with SMTP id z7mr4035036otm.179.1581716893415; Fri, 14 Feb 2020 13:48:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581716893; cv=none; d=google.com; s=arc-20160816; b=Nap+GCkc9E9wrMJ9oj3t1YQGKGP72YNe6d5++ok/K18Gk14SAWtVQOf7bRM8Yo7faE vNktGZo1tWNh2L5Do4tgbMTs9yj5WPKe2QnVjJyqLEAOY+bl7clxxSxCMOqRis07fvZj SFoQEQW/3msbz2P8enae+J7cj5blkdZ8C2IHpkGz8GbnAlAy7BrcwMT263Lku8HA9LXh PgxJMpBptlIH62VCZFgdRBIFsCkipIjRpwolu7eCmX4h3VdOq9nQoaZrvLPzSbtfSz0O 2kaVs5uBeosAGAaoTo9ZXoDXBTcTJBlrLsdQk3kjxop0e3R0+EiTMhroFrVtn5MaAHJC hZLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ULvgOcWtqQoiiZTQEcdkHo/hzvR0mDvJVo9JBCmHaro=; b=GvqEHDQbBirUusDRpP3tJAeitbE57DEJRZ9uU+3IrCunF4uLM3paEOeTGim/C+I0Op o3nV9Y7m3ZaSHIOW6ureX2dOGoQR31RhSH02zSDNgUx8+tpVcXis5rTgnwJ6UqAH/tnp g8vT4GE6IAGmqZF3vOKKAEqYycmoKdHturZa6O8LWrYgeE9KE50wmFtiw1NiHkw6Hma5 pGRyyDWWbWRjlbpjEnbeFcPj3qpq71+mrkXIG+pXO7/+NEEO5+L2Fg8ycMj3Ltn8jaSm 49WZWbJAWzwnLd77oddMhof50QMa+yflcmrg4yxOTmtU04o4YwejM/H0ulavU+Hl8t7+ 6dJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UghfVcGD; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v3si3607644otn.140.2020.02.14.13.47.55; Fri, 14 Feb 2020 13:48:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UghfVcGD; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730398AbgBNVrv (ORCPT + 99 others); Fri, 14 Feb 2020 16:47:51 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:38057 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729434AbgBNVrv (ORCPT ); Fri, 14 Feb 2020 16:47:51 -0500 Received: by mail-lj1-f194.google.com with SMTP id w1so12305567ljh.5 for ; Fri, 14 Feb 2020 13:47:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ULvgOcWtqQoiiZTQEcdkHo/hzvR0mDvJVo9JBCmHaro=; b=UghfVcGD99QDVJvEji3DwtzpIp/PGb7GJofQVdGg87wpeWgj5k1fmihFbyHJDkzhXm S1NEmhmLvIIspUxPsjqWYv+g8q0cgFqkqJsqk6YpKTd6xRAfC/+pRYqVa+LT/zHudhSe ezPpARw61nPYCHiuMSRuvAH2pkTlrESq7Y0NpQrB9ACMChfUqXxp93LrOIYT2VYUQCJo gmb8qcWUBCD71s/4fRxFDy4T3zhcDp/8yu4ZXGH549/K9U19OlbHknT8fxAAk5duXcIa zBQ+s0+fPCvaocHwCtDCGP4wFwcvFTeDl1IPB9yATUIb5hn70+tb0HH0Q6XBRHaUjClO 2Vvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ULvgOcWtqQoiiZTQEcdkHo/hzvR0mDvJVo9JBCmHaro=; b=br8YnOI/7cD3PASJPxgbjUmT3fKS+7XH/4dfE7fnOSf93C95AHC1oe5soUB3KwD1ju yVrBXFzH9HZMIv13hXi0CERWI9LiNrzoG9ABzpm1GeTTmC0GumW4C8SJYmg1ABHmv3mx Q70ZTynH8FfrydbsfhQStsLPYilC3y13pCtqdFZy6NL1xQAR6wXtURCCq4O243+K9XZA sZ14220m1AY2uva5ZB7V+IhOnGA369h4mNonb7JSDcjvASKXpqpU8CPZLvhZlMfE9RsU PwY3kHMixHjH4EjvofBiL7QJS0eN6w66JUFh5aFr/hQmhBCvsi6UHMkaOzD8Jk6G+KCP 3Z+w== X-Gm-Message-State: APjAAAWE8fMR+qBZZu6dkOLkJeXJMG4olq0Cn+pj+tQdAMc5rdxsqVx8 q5IUh6D753J5ZMaulcOMiiIdeuu7WWN3qOhCr/kxeg== X-Received: by 2002:a2e:85cd:: with SMTP id h13mr3415670ljj.191.1581716868386; Fri, 14 Feb 2020 13:47:48 -0800 (PST) MIME-Version: 1.0 References: <20200208013552.241832-1-drosen@google.com> <20200208013552.241832-2-drosen@google.com> <20200212033800.GC870@sol.localdomain> In-Reply-To: <20200212033800.GC870@sol.localdomain> From: Daniel Rosenberg Date: Fri, 14 Feb 2020 13:47:37 -0800 Message-ID: Subject: Re: [PATCH v7 1/8] unicode: Add utf8_casefold_iter To: Eric Biggers , Gabriel Krisman Bertazi Cc: "Theodore Ts'o" , linux-ext4@vger.kernel.org, Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, Alexander Viro , Richard Weinberger , linux-mtd@lists.infradead.org, Andreas Dilger , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel-team@android.com Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Feb 11, 2020 at 7:38 PM Eric Biggers wrote: > > Indirect function calls are expensive these days for various reasons, including > Spectre mitigations and CFI. Are you sure it's okay from a performance > perspective to make an indirect call for every byte of the pathname? > > > +typedef int (*utf8_itr_actor_t)(struct utf8_itr_context *, int byte, int pos); > > The byte argument probably should be 'u8', to avoid confusion about whether it's > a byte or a Unicode codepoint. > > - Eric Gabriel, what do you think here? I could change it to either exposing the things necessary to do the hashing in libfs, or instead of the general purpose iterator, just have a hash function inside of unicode that will compute the hash given a seed value. -Daniel