Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3580214ybt; Sat, 4 Jul 2020 23:43:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrIYqNGLqxictUFqCRWH8UXMLr1ZDWqaaGbwK9vvqswrvM1bw8MozIKj1YKkRQyRPSgg3O X-Received: by 2002:a50:8e53:: with SMTP id 19mr32786460edx.185.1593931437154; Sat, 04 Jul 2020 23:43:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593931437; cv=none; d=google.com; s=arc-20160816; b=FEVXcFw4UFPrMz4O45mnP+jN4ZsUoiwVRCa0ylIgTDxtrVpEN/b1vS2tHg4vSQLh/o GEMAvfu+rtvLhsmpU02NCbC5mtDv0MAdYzcm9b1j0dnDafm1Xtp6/txl3QFx9UngrX5C 1J4sk9Kwj5MkzCFbQkUcz/6VEosfLDN61sh5IOkHbxRZOAUNKVgMOMqALgZWrhYbI4Rc O/lgYy7s60n9DDQ9863jhsJay82rsbGZXAU7rM3++3Ia1ZqMlma5XBvzcheRcwI3TUqf BsVAYeV3NqT4lwrJemyaPcM5lXb+mTNKsp28862MSS3+LAhsRlCF9bQmrm8Qwn8S+CgZ LXvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OMeXN5/b7K5fCIhCyqLI0LAfiQ3ZT4Xn9DFmhUax7hA=; b=YqP75fyNHD4OswUyGd/Os+iHg5mhhA2Dc2MfTmZQfI9yPduQQv5sSPAL9i0dgDy0oD PgEM+3HZwI/u1QSiROgNahLUVQpBmWcaUh3CGu/Y3nxeUfYW9Pow7xyK00yrnlTTWVuv hRKb4F1p9Pj0tM+EfqRcJDkQBUtIcYY1utVx1H9pv7C+9QeouN3YRZ7mJgtmeYd9QZUf 8xQw9ECVR27/2RjEq4MIuTo9QZeQ0k6p+SucAqaPHBv62Gou2NSu3o0VNXvSaV4p+QgS BCSWYmrovP37t+cPFJCS8k8EM7EbnOvT3uB/pxl935emaBPj060PO5bClNWHCpl3Ft9h 9VoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eNOc7OZ5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si10648852eds.492.2020.07.04.23.43.34; Sat, 04 Jul 2020 23:43:57 -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=@gmail.com header.s=20161025 header.b=eNOc7OZ5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726331AbgGEGk7 (ORCPT + 99 others); Sun, 5 Jul 2020 02:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbgGEGk6 (ORCPT ); Sun, 5 Jul 2020 02:40:58 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA226C061794 for ; Sat, 4 Jul 2020 23:40:58 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id m22so6577253pgv.9 for ; Sat, 04 Jul 2020 23:40:58 -0700 (PDT) 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=OMeXN5/b7K5fCIhCyqLI0LAfiQ3ZT4Xn9DFmhUax7hA=; b=eNOc7OZ5WQuVvw9x8zJ9169rpmQEyowaV3xV9hS4Mn/7b4fEALpTa1ag82sk0ud3Qx w6ZOU+s5CQkc1aoJ/uKiDl2OzS3oeqjMH41KezFL69/QsUc4RA4mlTbeqdYe/CA/oCXM pVWKkzlNlfZK7Da5eO78z7ngEsxnAzXjsOXB0m+2fy7CgDsBuyZViv+uxy3EMfQqgxW6 63+f89JlOSQc57Xc0oyU10idVv0nJ0jknWHNJLz/1XL/KP+oNyR0+DyGAGnfDZ8Yii3F RK9en0m6hBMrGgedi/U6nNfxGDRGS3m4tpfk3ak5AJOHDnA3R42WW6pWebSmKI7yukkS 6hRg== 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=OMeXN5/b7K5fCIhCyqLI0LAfiQ3ZT4Xn9DFmhUax7hA=; b=lDPMDtFRdMJEtBjFPhHpnaq7VrjvqYgmAPCewbufu2PqKmbIzIv6svWqQkhYP3yILh /o9mkZK94egy84De+GGJGJMZ3/I1d+eQw81JUH2KTLkbr4n4eNmXe5pBjaSCB9260dIY Ca3RapQJgH9LeofiFFCvqt46LhLiIzR57rgCb6tSdqmmKWg7Mc74blToM9Loe+gRVjPH d2DshqIhC7KonyDN5uXsg7ycxtAu+RIktaVimfGaMmCYbzigO3LcbJ8s2BHmUrc5rNkK xrPa5Z9+edzB6yTRqTWFDgIeiBC7ZPI5l4QophOR3e8Ma85Lnr6gMkCK/kkBOG/P/tGj Uo2A== X-Gm-Message-State: AOAM530OaPeYAQhxzVEn+L8R/JiTH6mDHc8mV9QoOVCTxBSXPGnXJWEr gAc9uL9wD7Y3ikMxK6NGDs4= X-Received: by 2002:a63:1641:: with SMTP id 1mr35512763pgw.370.1593931257956; Sat, 04 Jul 2020 23:40:57 -0700 (PDT) Received: from gmail.com ([2601:600:9b7f:872e:a655:30fb:7373:c762]) by smtp.gmail.com with ESMTPSA id w29sm16082400pfq.128.2020.07.04.23.40.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Jul 2020 23:40:57 -0700 (PDT) Date: Sat, 4 Jul 2020 23:40:55 -0700 From: Andrei Vagin To: Catalin Marinas , Will Deacon Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vincenzo Frascino , Mark Rutland , Thomas Gleixner , Dmitry Safonov , Christian Brauner Subject: Re: [PATCH v5 0/6] arm64: add the time namespace support Message-ID: <20200705064055.GA28894@gmail.com> References: <20200624083321.144975-1-avagin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20200624083321.144975-1-avagin@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 24, 2020 at 01:33:15AM -0700, 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. > > v2: Code cleanups suggested by Vincenzo. > v3: add a comment in __arch_get_timens_vdso_data. > v4: - fix an issue reported by the lkp robot. > - vvar has the same size with/without CONFIG_TIME_NAMESPACE, but the > timens page isn't allocated on !CONFIG_TIME_NAMESPACE. This > simplifies criu/vdso migration between different kernel configs. > v5: - Code cleanups suggested by Mark Rutland. > - In vdso_join_timens, mmap_write_lock is downgraded to > mmap_read_lock. The VMA list isn't changed there, zap_page_range > doesn't require mmap_write_lock. > > Reviewed-by: Vincenzo Frascino > Reviewed-by: Dmitry Safonov Hello Will and Catalin, Have you had a chance to look at this patch set? I think it is ready to be merged. Let me know if you have any questions. Thanks, Andrei