From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id A69C43857C70 for ; Tue, 8 Dec 2020 18:25:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A69C43857C70 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0B8I2kPP105285 for ; Tue, 8 Dec 2020 13:25:48 -0500 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 35acf2vyvh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 Dec 2020 13:25:48 -0500 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0B8ICmAE011744 for ; Tue, 8 Dec 2020 18:25:47 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma01wdc.us.ibm.com with ESMTP id 3581u9664a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 08 Dec 2020 18:25:47 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0B8IOVHC25100694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Dec 2020 18:24:31 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 805ACC605D; Tue, 8 Dec 2020 18:24:31 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0AE62C6055; Tue, 8 Dec 2020 18:24:30 +0000 (GMT) Received: from localhost (unknown [9.80.215.224]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 8 Dec 2020 18:24:30 +0000 (GMT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20201203171528.83180-1-msc@linux.ibm.com> References: <20201203171528.83180-1-msc@linux.ibm.com> Subject: Re: [PATCH v2 0/2] powerpc: Add support for system call vectored From: "Lucas A. M. Magalhaes" To: Matheus Castanho , libc-alpha@sourceware.org Date: Tue, 08 Dec 2020 15:24:29 -0300 Message-ID: <160745186973.2173056.16101593781770208473@localhost.localdomain> User-Agent: alot/0.9.1 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2020-12-08_14:2020-12-08, 2020-12-08 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 spamscore=0 malwarescore=0 adultscore=0 bulkscore=0 suspectscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080108 X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Dec 2020 18:25:50 -0000 Hi Matheus, Worked on top of Adhemerval's brk patch. But it fails if applied directly on master. Tested on a POWER9 with and without scv support. Tested-by: Lucas A. M. Magalh=C3=A3es Quoting Matheus Castanho via Libc-alpha (2020-12-03 14:15:26) > This patchset enables the usage of system call vectored (scv) instruction= by > system calls for improved performance on POWER9 and later processors. >=20 > This new version dropped the patch to move brk to a C-based implementatio= n, in > favor of Adhemerval's patch [0]. So it should be applied on top of that. >=20 > Also, it modified the scv check mechanism to remove the thread pointer ch= eck as > suggested by Florian. Now the dynamic loader always uses sc, static code = still > checks the thread pointer before accessing the TCB, and shared code (outs= ide the > dl) accesses the TCB directly. >=20 > Please check each patch for more details, specially 1/2 which explains the > rationale and details of the runtime mechanism to choose between the old > behavior (sc) and the new one (scv 0). >=20 > Tested on powerpc, powerpc64, and powerpc64le (with and without scv) >=20 > [0] https://sourceware.org/pipermail/libc-alpha/2020-November/119770.html >=20 > --- >=20 > v2: > - Fix typos and comments to match GNU style > - Remove the check for the thread pointer on shared code, and always us= e sc > when inside the dynamic loader > - Drop the patch implementing brk in C >=20 > Matheus Castanho (2): > powerpc: Runtime selection between sc and scv for syscalls > powerpc: Use scv instruction on clone when available >=20 > sysdeps/powerpc/powerpc32/sysdep.h | 15 ++- > sysdeps/powerpc/powerpc64/sysdep.h | 120 +++++++++++++++++- > .../unix/sysv/linux/powerpc/powerpc64/clone.S | 36 +++++- > .../unix/sysv/linux/powerpc/powerpc64/vfork.S | 6 +- > sysdeps/unix/sysv/linux/powerpc/syscall.S | 11 +- > sysdeps/unix/sysv/linux/powerpc/sysdep.h | 93 ++++++++++---- > 6 files changed, 241 insertions(+), 40 deletions(-) >=20 > -- > 2.26.2