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=1.2 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 BF585C35670 for ; Sun, 23 Feb 2020 08:08:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 925E7206E0 for ; Sun, 23 Feb 2020 08:08:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qdG6a5mH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727166AbgBWIIP (ORCPT ); Sun, 23 Feb 2020 03:08:15 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:40942 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbgBWIIP (ORCPT ); Sun, 23 Feb 2020 03:08:15 -0500 Received: by mail-pl1-f194.google.com with SMTP id y1so2702856plp.7 for ; Sun, 23 Feb 2020 00:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yQk1zoKwLwWh37FUIzsv76O7XQbXKjoLP/vDR2rhq5Q=; b=qdG6a5mHwcoXs7RTbNh6kmru0Q2NPXRRviemSasiC2o4e01Hef3Y3Me1I5bBzz1/uO 56D5yukc3T4KdRu9TgG5a+36a7OugpCRC8yaRLHrThJeDdfQ4rZhUvHfOKlo2SPRQ84F JWa885rbJ3z6h5PodG2mj4Kr9ZehV5e0X8fufvVJUyuiY2xNfrTnM/kQS086qlseDDlD jvk+qTi3wR7HpW9u8nNCE7EUhsQgVXElj0GG2TvQ3e1AdNp+rpXnq3q7pGx8/CxBEVyW AgMqJ6YTI6x4EhJ3yWiyAjGbrChD6TiAFG8XrawPeskkAEcUp/HkXJr5S1YSbA0ti1f1 1j0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yQk1zoKwLwWh37FUIzsv76O7XQbXKjoLP/vDR2rhq5Q=; b=SEOrf2EkNtIx+qo4O78smV6JmOkraURLlCha5KUirhY9PVglyckr+7fzeQuWy11ZTJ L6F3xZSuQc+5Lm82FGNJDOltnAxPdhvafyHr7i3EBMXu912WEs5JqtzkALLrPmxjg5W6 uEzJ51l0hQ5siTJmEuGccth9bqmjlnmFRiTXBQjjz+F/DrEFGAzQdqxFnnZMsHCm80SC sQ7NGPvEjHE6c3EXLHnuFDNZ23ym5mm5EU2KqT0a1ROs5ivvIt/Hm3lraKJOzwj2C3d3 2hS61AT5Gx/88HMiB5xF8z3R2+Rx3AERUL7cijteY3LdbAVqOK0/XCby55XFucu4AB3O T62Q== X-Gm-Message-State: APjAAAVCzwlPwdBniwLGlsGRoi9N0+m44soPojW4YFcV/nPyTJRJxs5L RIu9j7hIfIcZegSJS0ybFI0= X-Google-Smtp-Source: APXvYqwiTY7/62F2gOlXwYs8R/dmD9HUIJ8WtLe7LvqVjiyj6uzrb8cWFT7iegdF6/n7O6JgYId+mw== X-Received: by 2002:a17:902:426:: with SMTP id 35mr44071795ple.176.1582445294652; Sun, 23 Feb 2020 00:08:14 -0800 (PST) Received: from gmail.com ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id t8sm7876146pjy.20.2020.02.23.00.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 00:08:13 -0800 (PST) Date: Sun, 23 Feb 2020 00:08:11 -0800 From: Andrei Vagin To: Vincenzo Frascino Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner , Dmitry Safonov Subject: Re: [PATCH 0/5] arm64: add the time namespace support Message-ID: <20200223080811.GA349924@gmail.com> References: <20200204175913.74901-1-avagin@gmail.com> <2d982452-12e5-5c0b-6e4c-adadb7a34616@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <2d982452-12e5-5c0b-6e4c-adadb7a34616@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 20, 2020 at 12:40:47PM +0000, Vincenzo Frascino wrote: > Hi Andrei, > > On 04/02/2020 17:59, Andrei Vagin wrote: > > Allocate the time namespace page among VVAR pages and add the logic > > to handle faults on VVAR properly. > > > > If a task belongs to a time namespace then the VVAR page which contains > > the system wide VDSO data is replaced with a namespace specific page > > which has the same layout as the VVAR page. That page has vdso_data->seq > > set to 1 to enforce the slow path and vdso_data->clock_mode set to > > VCLOCK_TIMENS to enforce the time namespace handling path. > > > > The extra check in the case that vdso_data->seq is odd, e.g. a concurrent > > update of the VDSO data is in progress, is not really affecting regular > > tasks which are not part of a time namespace as the task is spin waiting > > for the update to finish and vdso_data->seq to become even again. > > > > If a time namespace task hits that code path, it invokes the corresponding > > time getter function which retrieves the real VVAR page, reads host time > > and then adds the offset for the requested clock which is stored in the > > special VVAR page. > > > > Thank you for adding the arm64 support of time namespaces. Overall it looks fine > to me even if I have few comments. I will test it in the coming days just to > make sure I did not miss something major. I will keep you updated on the results. Thank you for the review. All comments look reasonable and I will address them and post a second version. Thanks, Andrei 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=1.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,FSL_HELO_FAKE, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 3EFE0C35670 for ; Sun, 23 Feb 2020 08:08:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 10FB1206E0 for ; Sun, 23 Feb 2020 08:08:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ob1nsgoA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qdG6a5mH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 10FB1206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vjvpAl4qwXWKlc7x6RjDm0D+kB06KNBsFlN1PPrLsYY=; b=Ob1nsgoAkiAae2 E80JwkxI/gpcxF/HWFx8QCZQ/hshumk1tJBxRs4fBSS4x9fos0I63/kvlndFsd6GYeceBuUel1Xp6 it/AVlGyEBcN+iBnGUmX0JydxFIncT41bBej8MrDp1c0h5hlVfAuB2C+zaefp0URY7tPfa1PQIVcM J2KI98fFK0FVf8+uCMlKhfYmAJuL6y/7UGIf2EHl9wumdChz2oXzBpZyi6DhmKyy7S1eAv6CfG7/U 0lWRMseX7iP9eAiKZcQEe/dwNvKqm+JrBIh8JM8z8nABryvDjV4RHPnTAuUJW/tHmFXgOvPrna0PN 35xRST4RMGuXKu2/ZR2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5mJH-0006jY-Hg; Sun, 23 Feb 2020 08:08:19 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j5mJD-0006jA-Oa for linux-arm-kernel@lists.infradead.org; Sun, 23 Feb 2020 08:08:17 +0000 Received: by mail-pl1-x643.google.com with SMTP id j7so2713559plt.1 for ; Sun, 23 Feb 2020 00:08:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yQk1zoKwLwWh37FUIzsv76O7XQbXKjoLP/vDR2rhq5Q=; b=qdG6a5mHwcoXs7RTbNh6kmru0Q2NPXRRviemSasiC2o4e01Hef3Y3Me1I5bBzz1/uO 56D5yukc3T4KdRu9TgG5a+36a7OugpCRC8yaRLHrThJeDdfQ4rZhUvHfOKlo2SPRQ84F JWa885rbJ3z6h5PodG2mj4Kr9ZehV5e0X8fufvVJUyuiY2xNfrTnM/kQS086qlseDDlD jvk+qTi3wR7HpW9u8nNCE7EUhsQgVXElj0GG2TvQ3e1AdNp+rpXnq3q7pGx8/CxBEVyW AgMqJ6YTI6x4EhJ3yWiyAjGbrChD6TiAFG8XrawPeskkAEcUp/HkXJr5S1YSbA0ti1f1 1j0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yQk1zoKwLwWh37FUIzsv76O7XQbXKjoLP/vDR2rhq5Q=; b=i4wUugNAELjb6gIb96hExyiZkRkERRF4nATtYSJRkV0Myb9rML+D1UvOuBAdDxwWbZ nZ/zECM+CcQRxXLxdIQKVKz7HX9Jjs+Gcqcc6HKMpvDEgu+cmN6iyhsCBi+Df9P2SRNp IzKg34RUHL9bpxhb5iFZky+/TMCF+921CDI3g9oSST5jvwxMME7c0z7R8qIOALbRV5/2 f7AEL7DeV9qL3jdRmEklCSc+qbqLqvbEHB88DtnJ2o1pzjC1x3ydYsbWvGXlaJ1EjkTg 1e9eg4gBC8V/nsbIP7U7r718MJlTk3DgYyV1WckiXU3YNCF8+Ob3QIyKyclhIggNig7C 4cSw== X-Gm-Message-State: APjAAAWaXLi4yVF7hHxB0tslz1Wt7KV9JjVFbmj0xhePMTUwIKWJmLtT EAdX9NvoOxSLI0PatM/eRKA= X-Google-Smtp-Source: APXvYqwiTY7/62F2gOlXwYs8R/dmD9HUIJ8WtLe7LvqVjiyj6uzrb8cWFT7iegdF6/n7O6JgYId+mw== X-Received: by 2002:a17:902:426:: with SMTP id 35mr44071795ple.176.1582445294652; Sun, 23 Feb 2020 00:08:14 -0800 (PST) Received: from gmail.com ([2601:600:817f:a132:df3e:521d:99d5:710d]) by smtp.gmail.com with ESMTPSA id t8sm7876146pjy.20.2020.02.23.00.08.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Feb 2020 00:08:13 -0800 (PST) Date: Sun, 23 Feb 2020 00:08:11 -0800 From: Andrei Vagin To: Vincenzo Frascino Subject: Re: [PATCH 0/5] arm64: add the time namespace support Message-ID: <20200223080811.GA349924@gmail.com> References: <20200204175913.74901-1-avagin@gmail.com> <2d982452-12e5-5c0b-6e4c-adadb7a34616@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <2d982452-12e5-5c0b-6e4c-adadb7a34616@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200223_000815_826220_03E3BDF3 X-CRM114-Status: GOOD ( 19.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Dmitry Safonov Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Feb 20, 2020 at 12:40:47PM +0000, Vincenzo Frascino wrote: > Hi Andrei, > > On 04/02/2020 17:59, Andrei Vagin wrote: > > Allocate the time namespace page among VVAR pages and add the logic > > to handle faults on VVAR properly. > > > > If a task belongs to a time namespace then the VVAR page which contains > > the system wide VDSO data is replaced with a namespace specific page > > which has the same layout as the VVAR page. That page has vdso_data->seq > > set to 1 to enforce the slow path and vdso_data->clock_mode set to > > VCLOCK_TIMENS to enforce the time namespace handling path. > > > > The extra check in the case that vdso_data->seq is odd, e.g. a concurrent > > update of the VDSO data is in progress, is not really affecting regular > > tasks which are not part of a time namespace as the task is spin waiting > > for the update to finish and vdso_data->seq to become even again. > > > > If a time namespace task hits that code path, it invokes the corresponding > > time getter function which retrieves the real VVAR page, reads host time > > and then adds the offset for the requested clock which is stored in the > > special VVAR page. > > > > Thank you for adding the arm64 support of time namespaces. Overall it looks fine > to me even if I have few comments. I will test it in the coming days just to > make sure I did not miss something major. I will keep you updated on the results. Thank you for the review. All comments look reasonable and I will address them and post a second version. Thanks, Andrei _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel