From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by sourceware.org (Postfix) with ESMTPS id 600623858C31 for ; Thu, 14 Mar 2024 14:29:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 600623858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 600623858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::529 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710426546; cv=none; b=xmpi7ZxgplbLNkBJq+LAkCEaV/B6XGW9o2k18XwVqiYI1KBQfGuF+Tv+Y0hyNnLnZ8sk+3JmEr3vHmV6qYIEUwE8rIn54IF4tfgXEjqpsEtQvidN5zXyUXD+HaS+dVgK3UabxG/HqJE30iwIa6ypFsOSJ40nTdeW4YFDmQOVZ3s= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710426546; c=relaxed/simple; bh=37vdPsJ/T4xeoyE0DfpCeNF9fWCSzMZFxp2LNapjmqQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=uk+ceANFHHqMpxf4EWe5dEg6nY0mSTFmvlQufAVAzs2gwO56Z7iuSxU0ed3Vxujxa1POd6G5Jr4X0IADTeQWIEx4mP4ovgIu8guMlm5955Ck90VTiwhbbZROvNWP5zmJCGECzXUY3AEiiuSpHlbgM8nRsND0+6p3frhFgcsRMaw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x529.google.com with SMTP id 41be03b00d2f7-5bdbe2de25fso756902a12.3 for ; Thu, 14 Mar 2024 07:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710426542; x=1711031342; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ICy/iEruDwIHxm/g38il1V5zmzZILjS7cym34C0qZbE=; b=W1kN1jlLNjMRoawMian/rebW11CY15YNTGblV/I9nA+qqQLAV9jixJfigBnLUzAAUR NHjuF12Y4pIUyZjrrh2MKgad9xWHGFQUGUB0aHCktVYzZoy+s3bxUl1dH7pPosTI7wHI IVUC9MbUdraVc2p6B/eYAcwLCysWTTTYla79CkEf6Jr11OjIQj/5R6212Au9HWO7XOGP NFcFAtv2KKtU/yBtSJ74foNTHM8tzLgylSl0mqlDap446WGc66vg7iCVgdxlej6ONM27 dGG2NrWuhWxyK9NYCyV+4D0keKmI3yqQZ0C5gy+ROn+mbm0fYgT1O/0qZRb1nYDJEVb/ YWIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710426542; x=1711031342; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ICy/iEruDwIHxm/g38il1V5zmzZILjS7cym34C0qZbE=; b=S0STS4m3LmdXFnKpNKFpLDDhxkN3qvH7mSRmMp+SqmF5a0AyudSBnIXQmp7avrUQZo 69VIuR/LV02+NV9azpWewi0ttkbQlKcr9H0Xam1T8gNl+EAzgPrPGKALDSiV/b2mWCJa d5tYoyuxYRYriKvE7u1LgV8Z7YFeRPN9fe6PrJo0WZ6LwvRO9Ikqm716x/XcfOq0Z/9n 1RKuoWCSrocO8bAUXqGw4W04ums0dSAvyUD0hmCd4eEdqtqtfjRPKcflUDCWouZzzgFU tVgsBo+gyGisNux3VXqQDVpq0iF7hJR/SGS4Bsbx4WoUTf3hNlk8wehZO5Lj4pwGRMlc k5YQ== X-Forwarded-Encrypted: i=1; AJvYcCWvWv9dyRfe2AeitVinybLtxIbh1i9vrUrdazq3xb/b0FBP1uCmww2nim3ztt5j6Rt4XDV9jLeghb6hfC91AAVIj58lSRd1+sEQ X-Gm-Message-State: AOJu0YynSjhjev7z6glKuq5KNy1zUhCF+yzHaolLt9ivH65yYQQ5U5lk I/9fI0ICsxcLZzm+nRNvLs9/Rx/X/jdjjvPj1X65hsJPUopyT3fCfLt42mT/W/3vBwqFXHZPIvn 9 X-Google-Smtp-Source: AGHT+IGwKWZwZSudTSd/sfOW9I3kMpmJO4TPiAmAuqGbMAc/J5llf89KD4OVJb82+eaFg5ZV+VEexg== X-Received: by 2002:a17:90a:ce12:b0:29b:b485:f4f8 with SMTP id f18-20020a17090ace1200b0029bb485f4f8mr148525pju.20.1710426542152; Thu, 14 Mar 2024 07:29:02 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:8dfd:a5c2:dad2:c11:fa85? ([2804:1b3:a7c2:8dfd:a5c2:dad2:c11:fa85]) by smtp.gmail.com with ESMTPSA id ie15-20020a17090b400f00b0029de90f4d44sm199759pjb.9.2024.03.14.07.29.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Mar 2024 07:29:01 -0700 (PDT) Message-ID: Date: Thu, 14 Mar 2024 11:28:59 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] AArch64: Check kernel version for SVE ifuncs Content-Language: en-US To: Szabolcs Nagy , Wilco Dijkstra , 'GNU C Library' References: <319a4afc-3841-4532-8350-be16e296c251@linaro.org> <44aeef4b-1044-4be8-9f35-e592a1c26080@linaro.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 14/03/24 11:26, Szabolcs Nagy wrote: > The 03/14/2024 10:47, Adhemerval Zanella Netto wrote: >> On 14/03/24 05:35, Szabolcs Nagy wrote: >>> The 03/13/2024 16:55, Adhemerval Zanella Netto wrote: >>>> On 13/03/24 16:25, Szabolcs Nagy wrote: >>>>> The 03/13/2024 15:12, Adhemerval Zanella Netto wrote: >>>> And I don't think __ASSUME_FAST_SVE would work well here, it means it >>>> would always detect a good kernel even when running on a older one >>> >>> why? if it is set based on min supported kernel version then >>> running on older kernel is a bug. if it can be overriden by >>> a tunable then it is a user error if the tunable is wrong. >>> >>>> (I am not sure how usual this is). The minimum supported kernel >>>> version can work to ensure that this check won't be necessary, but in >>>> this case we won't really need this test anyway. >>> >>> you mean after min version is increased the check can be removed? >>> i expect all __ASSUME* based on min linux version works like that >>> and it's useful to have the __ASSUME exactly to be able to find >>> which code can be removed after a min version increase. >>> >>> i don't know if distros actually adjust the min version in their >>> glibc, i guess that would be risky if it should work in containers, >>> so 6.2 min version is probably far in the future. >> >> All major distros I am aware of does not set --enable-kernel, so SVE >> only will be selected either someone builds a glibc with >> --enable-kernel=6.2 or when we raise the minimum version to 6.2. Not >> a deal breaker, but the SVE routines will ended up not being actively >> used for a long time. > > the __ASSUME would just gate the runtime version check, > we would still do a kernel version check so sve will be > used on new kernels, the __ASSUME is there so we dont > forget to remove the check when the min version is high > enough. Ah right, I assumed you suggested to use only the _ASSUME check instead of kernel version. Sounds reasonable to me.