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 X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEFE8C433DB for ; Tue, 23 Mar 2021 19:21:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6CF7A619D0 for ; Tue, 23 Mar 2021 19:21:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbhCWTUq (ORCPT ); Tue, 23 Mar 2021 15:20:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231449AbhCWTUP (ORCPT ); Tue, 23 Mar 2021 15:20:15 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14783C061574; Tue, 23 Mar 2021 12:20:15 -0700 (PDT) Received: from [IPv6:2401:4900:5170:240f:f606:c194:2a1c:c147] (unknown [IPv6:2401:4900:5170:240f:f606:c194:2a1c:c147]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: shreeya) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 1A3DC1F455BB; Tue, 23 Mar 2021 19:20:10 +0000 (GMT) Subject: Re: [PATCH v2 4/4] fs: unicode: Add utf8 module and a unicode layer To: Eric Biggers Cc: krisman@collabora.com, jaegeuk@kernel.org, yuchao0@huawei.com, tytso@mit.edu, adilger.kernel@dilger.ca, drosen@google.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, kernel@collabora.com, andre.almeida@collabora.com References: <20210318133305.316564-1-shreeya.patel@collabora.com> <20210318133305.316564-5-shreeya.patel@collabora.com> From: Shreeya Patel Message-ID: <594df967-606d-235f-ac49-5676009f543e@collabora.com> Date: Wed, 24 Mar 2021 00:50:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19/03/21 2:35 am, Eric Biggers wrote: > On Thu, Mar 18, 2021 at 07:03:05PM +0530, Shreeya Patel wrote: >> +struct unicode_ops { >> + struct module *owner; >> + int (*validate)(const struct unicode_map *um, const struct qstr *str); >> + int (*strncmp)(const struct unicode_map *um, const struct qstr *s1, >> + const struct qstr *s2); >> + int (*strncasecmp)(const struct unicode_map *um, const struct qstr *s1, >> + const struct qstr *s2); >> + int (*strncasecmp_folded)(const struct unicode_map *um, const struct qstr *cf, >> + const struct qstr *s1); >> + int (*normalize)(const struct unicode_map *um, const struct qstr *str, >> + unsigned char *dest, size_t dlen); >> + int (*casefold)(const struct unicode_map *um, const struct qstr *str, >> + unsigned char *dest, size_t dlen); >> + int (*casefold_hash)(const struct unicode_map *um, const void *salt, >> + struct qstr *str); >> + struct unicode_map* (*load)(const char *version); >> +}; > Indirect calls are expensive these days, especially due to the Spectre > mitigations. Would it make sense to use static calls > (include/linux/static_call.h) instead for this? Hi Eric, I just sent a v3 with static_call implementation. > > - Eric >