Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp961237ybg; Mon, 1 Jun 2020 20:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr94x2GImkL50ALVkLdhaX3bAIBEFQEONHUquV+H+L7Sd8cSzYCUR1Qx1IQywHfUmNAVt2 X-Received: by 2002:a17:906:4ada:: with SMTP id u26mr19626152ejt.368.1591067576130; Mon, 01 Jun 2020 20:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591067576; cv=none; d=google.com; s=arc-20160816; b=xqsBgF6LdOtp3BLMokb3YSnXCqfX4/7YviR1ZbvThj3bLj5cHdQx1af5HOvRrej8Dq KsDaGx/UcMgiLTgA8VVzI9T+I/KC4A2iT8oPvl26kt0/lzydHzWvFZkMHrAuol0+6odF 6nk3Mxwp9P1+1OtAy0aiRW85oVzi70dg2rvKNnv0nGmEd/0g2toehROuTYA6ddwZ5IEp luinYEul7NgAwuZTAvilCK1kZlkJOwV8pDs0ekqdlGooOOqMyR1fGnA3GtHyIGZEy1em u/6epOgmihwHxzJNYg5lnCiahwZ5q9b0hvvgZpDw3aHDwHhzKeNet84Dh3Aofne8XRsr glrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=mcWVEBjLUZjTlhCJLDc0yy15Dn4BUo5D9cQzlf8ql5Y=; b=MCL/PQrwvH097/5C6WUKj1hvD7jgWq52XTIBZDvFVzJbvFry0RIMQPbus63SYzvzjr UVApYe5PFp4DzwcUJKNfRGm7O6bzUkOLQnClp8mZvCJh6X7QR+7AYenvU6rayN7eIZFu 2ARfXuK1AnOBrdW0gkLNnvyuQddtiHX94/qvrP39yZXtbS/Nd4uQHH16fAOu1Ktr2Y5z gd5oqWZ+fE7wXHY7EXkA9MYbRL5nqcLGWstEfNnmjHaj+swIXVa80krEd4VTxWNAy12C VM5tZxdKlJv6NJdoQfHXvizc8kR0R2BnZcmX2umk9A9omClbexye1Y+iWho+VrDEp06A PACg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p86VHXmH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z7si771392ejp.639.2020.06.01.20.12.33; Mon, 01 Jun 2020 20:12:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=p86VHXmH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726565AbgFBDI2 (ORCPT + 99 others); Mon, 1 Jun 2020 23:08:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:49642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725850AbgFBDI2 (ORCPT ); Mon, 1 Jun 2020 23:08:28 -0400 Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 84FE820734 for ; Tue, 2 Jun 2020 03:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591067307; bh=OSeKIBeNKdViZCLRp/a6oN0A3BXom2MMiKOlG4JOszY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=p86VHXmH+JPweu+gOsbLIcYD0DrJgbf2BLnT10K/gjaNhTifoYYaQq2u9EliMi3SV EzSMy0zTWYGeElwnM13nU0tkysAwWWifCFuxKXNUE2mAHSPb/o0xO2ESCtF5tn9jk6 Kp45e+zS3mYV25/5uFkc4G/eq9BWLDm5JaGsa8tU= Received: by mail-lf1-f41.google.com with SMTP id x27so5222461lfg.9 for ; Mon, 01 Jun 2020 20:08:27 -0700 (PDT) X-Gm-Message-State: AOAM530OdVmxTN/es5IP+rD3Z4kCkHKbqTB1YjHaH3ZpuowSYdythqdG jKmsUEJZNfR4y6xgByEY22zbK8yZzL6wV/Spv7s= X-Received: by 2002:a05:6512:3111:: with SMTP id n17mr12611309lfb.137.1591067305860; Mon, 01 Jun 2020 20:08:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Guo Ren Date: Tue, 2 Jun 2020 11:08:14 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v4 00/13] riscv: Add vector ISA support To: Greentime Hu Cc: Guo Ren , Vincent Chen , Paul Walmsley , Palmer Dabbelt , linux-riscv , Linux Kernel Mailing List , Oleg Nesterov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 2, 2020 at 10:21 AM Greentime Hu wrot= e: > > Guo Ren =E6=96=BC 2020=E5=B9=B45=E6=9C=8831=E6=97=A5 = =E9=80=B1=E6=97=A5 =E4=B8=8B=E5=8D=8811:52=E5=AF=AB=E9=81=93=EF=BC=9A > > > > Hi Greentime & Vincent, > > > > Thx for the dynamic vlen implementation. I've two suggestions: > > - Please give out glibc patches mail URL, we need to review them toget= her. > > - We need to consider that not all processes need vectors. Most > > system processes do not have vector features, and we should not force > > save/restore vector for every process. > > > > Hi Guo, > > Thanks for reviewing the patch. We are still cooking the glibc patch, > we will add the glibc link address once we post it. > For the save/restore mechanism in signal, it is basically the same > with FPU porting, we can optimize it when setup_sigcontext() for both > FPU and VECTOR in the future. > > /* Save the floating-point state. */ > if (has_fpu) > err |=3D save_fp_state(regs, &sc->sc_fpregs); > /* Save the vector state. */ > if (has_vector) > err |=3D save_v_state(regs, sc); > > There should be a better way to detect whether this task use > fpu/vector or not. Might be elf attributes or something else. Ok, we could improve it in future patches. --=20 Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/