Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp425426iob; Wed, 18 May 2022 05:21:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxl04bE3Vd2BjbZCLj59hOUkko/gdzmkU9rw5syCHPjzgwzIVYA2LeUsc633IDj91c0YEFR X-Received: by 2002:a17:902:ee8d:b0:161:5c5c:d0e6 with SMTP id a13-20020a170902ee8d00b001615c5cd0e6mr19777492pld.32.1652876514862; Wed, 18 May 2022 05:21:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652876514; cv=none; d=google.com; s=arc-20160816; b=fGLfOu/D6DaKy2oh4XIOyAVVAlwLhzIDVa5XsoM6WfL9S9UT9BdPt7M5y5TJJy4cAw C3fpCxNpbKQtuoEb4vXQLpLYkhvcSKv3nqNmKGM9vUDkXW6pniGDLJN5qATrHcXv31xE OMcpq4hGr0R3nMAas88TVL8An9ktPeSddqRWNtsqyg56fcTgSBR5/HUtZ3inF5XkziF4 xL4awyyzdkFMWmnELQwuLti08KCCXsg0QHFut5UuigsBKJ6w/myglJ2t5wSP+uvBG+o9 x0kvloUoWZ+74Xu9O4Euwnolm83RLqXhlFKr+O3REHu37LcZRXXy9/y/9P8xfPDnjx5C Ds7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9r+gPElnJVP8tCAnWitGOvk8YXLPGtSi9I5ydDa7xpA=; b=TZgjRJ2sqauJAqpRYTHnGQ68H+edVdGqec+2P970N2O/BaIbmVDW0xq3R63TTzidDb h2HZ1xNPuk6z1Zi+xxVdOJmjnYQ8UPMnPmb/VMC+ENAqAOUo/uGPatp5e5cpownOXZDd KZySYiXIld1gWVOnun/O66szxtGxo4OTbfryBRUjt/47I6YBhkD28f82wWCQvhl5c0p/ F4l2rU98EohAlVWRFRhDYsq8fSF9QtBspoh1KjRyF6iqRExtLankE3422yqGVT3CcK4t AtxeyYueKinTh2YVzwNOJPhLmAekxBeXR08hpMBqdX8qXXRxg00bo+nrL+ekRMdLWRqq ahmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WMhtvuOM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id j17-20020a056a00131100b004faac3a73f6si3147169pfu.79.2022.05.18.05.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 05:21:54 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=WMhtvuOM; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BF01D188E73; Wed, 18 May 2022 05:14:58 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236258AbiERMOn (ORCPT + 99 others); Wed, 18 May 2022 08:14:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236224AbiERMOi (ORCPT ); Wed, 18 May 2022 08:14:38 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48448187D92 for ; Wed, 18 May 2022 05:14:33 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D8ACD1F8CD; Wed, 18 May 2022 12:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1652876071; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9r+gPElnJVP8tCAnWitGOvk8YXLPGtSi9I5ydDa7xpA=; b=WMhtvuOMPfMCZax4or3zzsT7ft7vS5rGAM1j1qZmJupHus5HM6rwLdNeJjfcQmJ3Jb7Lb0 KVZAhuIB60i2EkL8zH/gBVgXasinLow6VUMb8qc+YOrROyOEnGbkwVUMUBAoB2FO1RH7fs bwDLsSHfzSgT143/uF7O+RIPYGTrH7Q= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A19C52C141; Wed, 18 May 2022 12:14:31 +0000 (UTC) Date: Wed, 18 May 2022 14:14:28 +0200 From: Michal Hocko To: CGEL Cc: Balbir Singh , akpm@linux-foundation.org, ammarfaizi2@gnuweeb.org, oleksandr@natalenko.name, willy@infradead.org, linux-mm@kvack.org, corbet@lwn.net, linux-kernel@vger.kernel.org, xu xin , Yang Yang , Ran Xiaokai , wangyong , Yunkai Zhang , Jiang Xuexin Subject: Re: [PATCH] mm/ksm: introduce ksm_enabled for each processg Message-ID: References: <20220517092701.1662641-1-xu.xin16@zte.com.cn> <6284a2ef.1c69fb81.e53cd.32b2@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6284a2ef.1c69fb81.e53cd.32b2@mx.google.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed 18-05-22 07:40:30, CGEL wrote: [...] > 2. process_madvise is still a kind of madvise. processs_madvise from > another process overrides the intention of origin app code ifself that > also calls madvise, which is unrecoverable. For example, if a process "A" > which madvises just one part of VMAs (not all) as MERGEABLE run on the OS > already, meanwhile, if another process which doesn't know the information > of "A" 's MERGEABLE areas, then call process_madvise to advise all VMAs of > "A" as MERGEABLE, the original MERGEABLE information of "A" calling madivse > is erasured permanently. I do not really follow. How is this any different from an external process modifying the process wide policy via the proc or any other interface? -- Michal Hocko SUSE Labs