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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A1919C77B7E for ; Thu, 1 Jun 2023 14:07:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=lPRQbOF8jLBaTQGhg8EbGdS8mLCWV2IHK4Be7XSvYKk=; b=fCZTg1VAjfJwZQ H1hx7uDGzEf/WDH85DZEVwCBCRD46AhNTBdUOyVkIGwniv5gNN3eGf5V9GzMvWkKbKdI5dVlU0j36 +W6zR3XEX0s6abHy+qAzDcbI2upVl1UB1qAmbLoXF4PyNV6xEgPeNsO0s9cl1vHXkYiIhKYBn7wC6 7YB3aGUXPBSyna+qLg8cry7lw+XalmN0ypupWNb1RAIS9i6k98NMY71VtbBzpB26gw3H0bCm8klxr z763Sxi7V8HGIcmn3efT1OkDUKaExLsfObZN/hqAubfrO5SBNGnDQImyjtFQJ+7pXIfUS42OEV1To k5Jwd5TmYCghJooP6uBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4ixL-003mJP-1Q; Thu, 01 Jun 2023 14:07:11 +0000 Received: from mail-oi1-x22f.google.com ([2607:f8b0:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4ixI-003mF4-0w for linux-arm-kernel@lists.infradead.org; Thu, 01 Jun 2023 14:07:10 +0000 Received: by mail-oi1-x22f.google.com with SMTP id 5614622812f47-39831cb47c6so277414b6e.2 for ; Thu, 01 Jun 2023 07:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1685628419; x=1688220419; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Il8ad/JyLlNtEN0Gv4lgifY2JQdLnMbUxgSHsXnJD/E=; b=Ja7iIoiaBZS06nl+158TUHHbNfEj3dQZ/L62R0DW/ijsVPGlsZ2O32Ba4eQCHX0zAg LfHMRKbOsxI5fTkJegrENtOKGl9zwk0OJLur02SGJ6GIveUDBcVkr+UhIEaFUVcRjrKv I+lxCwssvsZK8CqLx1MBuX6uAdKjNETkdRqy7zXaIaDyhuZ4NBPXIc4oT4Kq9QPYL/wp rQLV8GNPnEEDqd/Ylc/L8oZa2HjL+J1vDLj4QFw7X1INT12js5HjHN0Joz+wUbJ02lUx KBCcn64/pwCReWJpNIW2B8GeaXRlQuUpK9rJC0snd+LGP1JbYm8YgxK8d5hCtKnpZFl1 SjSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685628419; x=1688220419; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Il8ad/JyLlNtEN0Gv4lgifY2JQdLnMbUxgSHsXnJD/E=; b=hJyuT1fiTrEKxa/YAm5F4AJCJoDmlrzZ4IMf9iocgs/FEKPsJX3e3yqd+Dci8wNj7I +Bzm6z87s2UKJbdGcxE+AetnGZVVOn9rXP0LN0VodreoP8foY+gjEH6bv601TStINu5J DA4jzh1sXOBqCp6TMo882GobzSmBY7xKexi04j3QoMZP8uCY96xd20tiHA1bLCfSs7AS ua2sHYi8WUXRhwWdiV4T3DMXUt75y73HBVSgsOd6nGBGhQjs3lT5ydJvbn8qX3qgM981 DMnpTZSU2kxJsXWa7Qyrfz7uQgeT3UwKCHf429KFbNGsJ72cHm25B8QRt4iSgKLX6m/r D1zg== X-Gm-Message-State: AC+VfDyL9e6K618ro+XtCHgWNWPypsv/8jMwosdfilB/W8umtm1YjhnG gl4/9Et/tpTVUTGATd++DNbZhA== X-Google-Smtp-Source: ACHHUZ4AEXih+LbcgXQJ3oJivdeKU2TDKI4u9IDJeO3/vV8DGscgFzmcnAdAr6rfYy2wFC0uefsS6g== X-Received: by 2002:a05:6808:1494:b0:398:1186:88b9 with SMTP id e20-20020a056808149400b00398118688b9mr5790684oiw.30.1685628419236; Thu, 01 Jun 2023 07:06:59 -0700 (PDT) Received: from ziepe.ca ([206.223.160.26]) by smtp.gmail.com with ESMTPSA id es1-20020a056214192100b00626195bdbbdsm5454337qvb.132.2023.06.01.07.06.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 07:06:58 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1q4ix7-001SP8-JZ; Thu, 01 Jun 2023 11:06:57 -0300 Date: Thu, 1 Jun 2023 11:06:57 -0300 From: Jason Gunthorpe To: Jann Horn Cc: Peter Xu , Hugh Dickins , Andrew Morton , Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Russell King , "David S. Miller" , Michael Ellerman , "Aneesh Kumar K.V" , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , Alexander Gordeev , linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 09/12] mm/khugepaged: retract_page_tables() without mmap or vma lock Message-ID: References: <35e983f5-7ed3-b310-d949-9ae8b130cdab@google.com> <2e9996fa-d238-e7c-1194-834a2bd1f60@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230601_070708_326376_81955B9F X-CRM114-Status: GOOD ( 14.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 01, 2023 at 12:18:43AM +0200, Jann Horn wrote: > 3. We have to *serialize* with page table walks performed by the > IOMMU. We're doing an RCU barrier to synchronize against page table > walks from the MMU, but without an appropriate mmu_notifier call, we > have nothing to ensure that we aren't yanking a page table out from > under an IOMMU page table walker while it's in the middle of its walk. > Sure, this isn't very likely in practice, the IOMMU page table walker > is probably pretty fast, but still we need some kind of explicit > synchronization to make this robust, I think. There is another thread talking about this.. Broadly we are saying that we need to call mmu ops invalidate_range at any time the normal CPU TLB would be invalidated. invalidate_range will not return until the iommu HW is coherent with the current state of the page table. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel