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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CFBFC05027 for ; Mon, 23 Jan 2023 18:06:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233559AbjAWSGh (ORCPT ); Mon, 23 Jan 2023 13:06:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbjAWSG3 (ORCPT ); Mon, 23 Jan 2023 13:06:29 -0500 Received: from 66-220-144-178.mail-mxout.facebook.com (66-220-144-178.mail-mxout.facebook.com [66.220.144.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C21E930E94 for ; Mon, 23 Jan 2023 10:06:11 -0800 (PST) Received: by dev0134.prn3.facebook.com (Postfix, from userid 425415) id 41C5F5616BD3; Mon, 23 Jan 2023 09:37:56 -0800 (PST) From: Stefan Roesch To: linux-mm@kvack.org Cc: shr@devkernel.io, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-trace-kernel@vger.kernel.org Subject: [RESEND RFC PATCH v1 01/20] mm: add new flag to enable ksm per process Date: Mon, 23 Jan 2023 09:37:29 -0800 Message-Id: <20230123173748.1734238-2-shr@devkernel.io> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230123173748.1734238-1-shr@devkernel.io> References: <20230123173748.1734238-1-shr@devkernel.io> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This introduces the new flag MMF_VM_MERGE_ANY flag. When this flag is set, kernel samepage merging (ksm) gets enabled for all vma's of a process. Signed-off-by: Stefan Roesch --- include/linux/sched/coredump.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/sched/coredump.h b/include/linux/sched/coredum= p.h index 8270ad7ae14c..0e0de5b7469f 100644 --- a/include/linux/sched/coredump.h +++ b/include/linux/sched/coredump.h @@ -86,4 +86,5 @@ static inline int get_dumpable(struct mm_struct *mm) #define MMF_INIT_MASK (MMF_DUMPABLE_MASK | MMF_DUMP_FILTER_MASK |\ MMF_DISABLE_THP_MASK) =20 +#define MMF_VM_MERGE_ANY 29 #endif /* _LINUX_SCHED_COREDUMP_H */ --=20 2.30.2