Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1610737rwd; Sun, 21 May 2023 02:17:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7MB5YIww8176CGQ1V8T1Yn5Ab1rzOJzgPq/tMKCEX+3trCrkIFeys48WRBdEdX81GR33Gs X-Received: by 2002:a17:90b:438d:b0:24d:e929:56cf with SMTP id in13-20020a17090b438d00b0024de92956cfmr6898381pjb.39.1684660645540; Sun, 21 May 2023 02:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684660645; cv=none; d=google.com; s=arc-20160816; b=G7dVDpfNtK3n4tvnhHPWyMQ4VHJWcx9/yXWMTM9u+WEaEgOOhZiC8p5B4BfbZUj0RX bl7kSFXj96JYRUeiKChysJRb6TRtNQX/X+89x4b0dbUGnIUuEPlgKxG2CMivoz9nuxx/ HSnx4Ndk0ODEB8jt7ydPYJ0aZ/XQtHLfcDmIBZAFRYQCZGyCBg16hQn9fiznjjk0oJTi gM8HsgRmYPQkTHNkZ6ltGQdsugXi1EANjnvj8z0DH/Vks93DxSqED+Kjb2366AC+lu5+ L1Mue2eqJfd0PvplKsvXKWb4kCilJ3lBh0f3FBnsA3QlfF7KQoPKJbUwTES1INgbTAqd JE8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=J6QGR+R9nb0MwoXrY/wVlgZDi2AoSc1og9Jf61EJyDc=; b=Zrxl5ZW4LDT0jl83vnCbU2xhYa0NzRr3Ytj+k+dTYtxz8edaYViQ0z3N65uKnLAymc RnLDkp9Pei1OxxMnZ9VWtPgvojg4gP+LBdd3ADoaBxt7A221SW1SaJcwgNlLMhe9L5K+ No/8DUPuNQUJddEd/qGnFrs7ZEwfd/d2ypz0XRLU8TRYHMR3ABfBLHefRtLYPoHgCt/Z K+YEg5fW5sQAVhL60RvJk2SyQ5megttxslQZS4tRxhgngPpQHb806HADCN79goXzubK0 xXDA7KZ/vqXrOvq33tL5sD5NcPxq5SQmrNt88jdKs7aRvvWjpd9utzUoRJHBzRgO43gT Di+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YVPYT6UH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 10-20020a17090a0f8a00b00250291be156si4959846pjz.148.2023.05.21.02.17.12; Sun, 21 May 2023 02:17:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YVPYT6UH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229938AbjEUJPn (ORCPT + 99 others); Sun, 21 May 2023 05:15:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229481AbjEUJPe (ORCPT ); Sun, 21 May 2023 05:15:34 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82C32CF for ; Sun, 21 May 2023 02:15:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 025FE60DE8 for ; Sun, 21 May 2023 09:15:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ED62C433EF; Sun, 21 May 2023 09:15:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684660532; bh=J6QGR+R9nb0MwoXrY/wVlgZDi2AoSc1og9Jf61EJyDc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=YVPYT6UHU0h3BbC7xXT3xJzABOj9G5nhlyVQ96KFJ6bCDcF+a0srZJb7Egs0sxAQf o9IrjNXTV6kNdB9CcZddF4aNPVGZP3gkBSs1zmS1yWBVzDCqAnv2Y+1KlGn0R+Ps88 RorQaM2o2TMrWa93tO3Ahwoh7ol3IvMAW1taijxPc2tps0W0Eyz8m/xWiqe4MsY2uC jN7aQSIRMz1ENygz/CLpJzSK9llKsaiLK48NAwY7v9fmhTpl+BELcfYKD6U+EFgIGx ogJgLpod1Mhgb8GxEEYcM0D7M0yLakjf5TDyzfuk2Hd7GUo+Xt472eQLaLeCPNvvjb /7AkIvUWlWlQA== From: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= To: David Hildenbrand , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Anshuman Khandual Cc: =?utf-8?B?QmrDtnJuIFTDtnBlbA==?= , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Oscar Salvador , virtualization@lists.linux-foundation.org, linux@rivosinc.com, Alexandre Ghiti Subject: Re: [PATCH 0/7] riscv: Memory Hot(Un)Plug support In-Reply-To: <87zg62eqm4.fsf@all.your.base.are.belong.to.us> References: <20230512145737.985671-1-bjorn@kernel.org> <9aa7d030-19b5-01df-70c0-86d8d6ab86a6@redhat.com> <87zg62eqm4.fsf@all.your.base.are.belong.to.us> Date: Sun, 21 May 2023 11:15:29 +0200 Message-ID: <87lehikpu6.fsf@all.your.base.are.belong.to.us> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David and Anshuman! Bj=C3=B6rn T=C3=B6pel writes: > David Hildenbrand writes: > >> On 12.05.23 16:57, Bj=C3=B6rn T=C3=B6pel wrote: >>> From: Bj=C3=B6rn T=C3=B6pel >>>=20 >>> Memory Hot(Un)Plug support for the RISC-V port >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > [...] > >> >> Cool stuff! I'm fairly busy right now, so some high-level questions upfr= ont: > > No worries, and no rush! I'd say the v1 series was mainly for the RISC-V > folks, and I've got tons of (offline) comments from Alex -- and with > your comments below some more details to figure out. One of the major issues with my v1 patch is around init_mm page table synchronization, and that'll be part of the v2. I've noticed there's a quite a difference between x86-64 and arm64 in terms of locking, when updating (add/remove) the init_mm table. x86-64 uses the usual page table locking mechanisms (used by the generic kernel functions), whereas arm64 does not. How does arm64 manage to mix the "lock-less" updates (READ/WRITE_ONCE, and fences in set_p?d+friends), with the generic kernel ones that uses the regular page locking mechanism? I'm obviously missing something about the locking rules for memory hot add/remove... I've been reading the arm64 memory hot add/remove series, but none the wiser! ;-) Bj=C3=B6rn