Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2635335rwr; Fri, 21 Apr 2023 11:34:38 -0700 (PDT) X-Google-Smtp-Source: AKy350Z9oa9XtJhWfPQmU2aQVY/Xc5fhm/9sjiIqGN0UFg7SWHi0/bFkb/gTIAUgFEWuXsj6bbIl X-Received: by 2002:a05:6a21:3384:b0:f0:251f:f099 with SMTP id yy4-20020a056a21338400b000f0251ff099mr8247966pzb.1.1682102078194; Fri, 21 Apr 2023 11:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682102078; cv=none; d=google.com; s=arc-20160816; b=NMFNlIEQvvKK9rWafd9g0tdoisG85at3F/MVGZShzdi9x2uKFNjfec5wRWPUXENWFO qlw7fR4g3bgusTyDB2uwP0HgburjnULY456hvs68IAGqqHZCGThziLT2s5ISFpRxo6Vi JfD2faIvxv1LjXGyPLo85R8kmW+hdCgmHybFiuftc9HzlUHLyrEZWp2KthCraiJhCQGe oYikbQNLRtG5SAbm0WzNYCvYJ5ZS6uz5G3K/Jegjn/Umw+EQ4ojd8cOCSZAGoGDrGdfC wMytKzgK8jrsevuBLdeZ/xWX5j0X4KyTkItpL/UH6t14jyXRlmpt24Jjckn7mfr674wB APUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:feedback-id:dkim-signature :dkim-signature; bh=E1giA72jTN/HCoY+ZkODXi5a5cgWitw0+lONQS3/t7A=; b=Y7Tc6T8+ISWR6r08WwFNOfGVgV9UqFVLA1iUNvvO6inHLI9UUvF2M1dB9T3NrvfjCx oNbLk0xuZjiyUxQajQ9+FR1yX1S+c/VJQRclLUIYxXADZfi3U6Jwr9FWghrcHTBDUEGA /eYqrg9R+BjXRuIh+A/hEqi4UNZPTmzsb/4cjETTTP4VNWLz111j1JG86QqMbcYurYkP DlGTSXX3iCkGzF6u2Mt+gQvdkCxmDw1WEU1KIr6kjdHXIzQilfwUKnNCc5Gvz+L6KjRZ zYfiZ/i6Sm5QlpYL/jQyme0Q5Ukj5GSoC1VlzzGzMmKQpS/sLU8tfYcEHy/iv4FK4mbb tLHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@devkernel.io header.s=fm1 header.b=cLCvpeRM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XIrOUyfO; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j188-20020a6255c5000000b006262531b3cdsi4832733pfb.356.2023.04.21.11.34.25; Fri, 21 Apr 2023 11:34:38 -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=@devkernel.io header.s=fm1 header.b=cLCvpeRM; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=XIrOUyfO; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233172AbjDUS3Q (ORCPT + 99 others); Fri, 21 Apr 2023 14:29:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232989AbjDUS3O (ORCPT ); Fri, 21 Apr 2023 14:29:14 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F92E1BD5; Fri, 21 Apr 2023 11:29:13 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8C7B35C00C9; Fri, 21 Apr 2023 14:29:12 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 21 Apr 2023 14:29:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devkernel.io; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1682101752; x=1682188152; bh=E1 giA72jTN/HCoY+ZkODXi5a5cgWitw0+lONQS3/t7A=; b=cLCvpeRM5lx2n8YJEv ctpJlrZd/cvTHHyzMCqw1BVqTcXVgeLCqb6QV1QZ0tmVSCw9Hokf234+XqSzm4wE 8ZE2nK2wllZNzlTioQ86W4TDsy24scnOtD3hOgN0i3sihzKtD/okV26x7RMy9Bd0 2LXLm7wPcpVpII3aB9gwV7jKqUblefDZ83PxTFnb1EHAHQggvFodY38vkpyMRptU hl0PYvUz/2O8jpnRSYxgPwgQGxXBJv2NDPISJg1Bh/F/2iUTViHO30IulUGDPCCy Z8n7wWABxBx8tPwzyZv+kYdZ3sRfOpFf9kCDyQmAVjQhC3u9TmI3DbQvqjNzdC0x g0OQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1682101752; x=1682188152; bh=E1giA72jTN/HC oY+ZkODXi5a5cgWitw0+lONQS3/t7A=; b=XIrOUyfO9vgiYaLiAwjPy6D6dkCoa 284FdZQk/VS33jzayeoEjODvPto3BtKkfK70YwVOCM2JSOMn75m1dCaqYnLonpC3 9l5MIAw/lEGNYqSmWOPgvPg7EwkCcuIXJmxOeQUxnkwBVJcgugyAAd1ThFSemUbR 6Hqy95yY9FGhXXuago4M6ZZKvk2fpnGwEi/ttra1jyu+Z7uefg/A0ULK7lcOcilI Kjrwf6Zb16O5X4zZv2iaYMNJbRIC8Oq+agK1Ke/2HXtUuQ2K1gKENt8ONx5a3htl nlsAz9A8jPMF8dMPtv/L5qnyuCMMxN8zqAzpb3arJMG4eGGB7CWOIloqQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtgedguddvfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpehffgfhvfevufffjgfkgggtsehttdertddtredtnecuhfhrohhmpefuthgv fhgrnhcutfhovghstghhuceoshhhrhesuggvvhhkvghrnhgvlhdrihhoqeenucggtffrrg htthgvrhhnpeevlefggffhheduiedtheejveehtdfhtedvhfeludetvdegieekgeeggfdu geeutdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hshhhrseguvghvkhgvrhhnvghlrdhioh X-ME-Proxy: Feedback-ID: i84614614:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 21 Apr 2023 14:29:10 -0400 (EDT) References: <20230418051342.1919757-1-shr@devkernel.io> <20230418152849.505124-1-david@redhat.com> <20230418152849.505124-2-david@redhat.com> User-agent: mu4e 1.10.1; emacs 28.2.50 From: Stefan Roesch To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-s390@vger.kernel.org, linux-kselftest@vger.kernel.org, Andrew Morton , Rik van Riel , Johannes Weiner , Michal Hocko , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Heiko Carstens , Vasily Gorbik , Sven Schnelle , Shuah Khan Subject: Re: [PATCH v1 1/3] mm/ksm: unmerge and clear VM_MERGEABLE when setting PR_SET_MEMORY_MERGE=0 Date: Fri, 21 Apr 2023 11:28:49 -0700 In-reply-to: Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 David Hildenbrand writes: >>> I understand we want to keep the name "symmetric" with >>> ksm_enable_merge_any, but it also unmerges the ksm pages. Do we want to >>> reflect that in the function name? >> ksm_disable_merge_any_umerge() is suboptimal. >> As ksm_disable_merge_any() now reverts what ksm_enable_merge_any() ended >> up doing, I think it's just fine. >> (it would be a different story if we'd be using "set" / "clear" >> terminology instead of "enable" / "disable"). >> We can describe that in the comment. >> >>> >>> Can we add a comment for the function? >> Can do for symmetry with ksm_enable_merge_any(). >> > > +/** > + * ksm_disable_merge_any - Disable merging on all compatible VMA's of the mm, > + * previously enabled via ksm_enable_merge_any(). > + * > + * Disabling merging implies unmerging any merged pages, like setting > + * MADV_UNMERGEABLE would. If unmerging fails, the whole operation fails and > + * merging on all compatible VMA's remains enabled. > + * > + * @mm: Pointer to mm > + * > + * Returns 0 on success, otherwise error code > + */ LGTM Acked-by: Stefan Roesch