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 X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41A75C07E95 for ; Tue, 20 Jul 2021 16:18:53 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD99361208 for ; Tue, 20 Jul 2021 16:18:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD99361208 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 391E86B0036; Tue, 20 Jul 2021 12:18:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 342026B005D; Tue, 20 Jul 2021 12:18:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E2DD6B0070; Tue, 20 Jul 2021 12:18:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id D84876B0036 for ; Tue, 20 Jul 2021 12:18:52 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 60F321820828F for ; Tue, 20 Jul 2021 16:18:51 +0000 (UTC) X-FDA: 78383474862.09.8197670 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) by imf11.hostedemail.com (Postfix) with ESMTP id 19E39F000208 for ; Tue, 20 Jul 2021 16:18:50 +0000 (UTC) Received: by mail-yb1-f176.google.com with SMTP id p22so33517624yba.7 for ; Tue, 20 Jul 2021 09:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BF4wPFMGvJMx+e9zXgrbf4Lj5+O/3oIlVh3I/7nAW28=; b=ebloSyKUKkgIs+5bbIXrcys7dZ7H0YEYo0N3DdxsuSL9UXqyZuvkKRH2OU/kRrCCzc nrHXcBFtkbYxBzYRNuWL+IQ+SNmmEGc3glpp8pV3QGWQIwWHD1P5RjuFU3lUoNKle/xW 2pT/H/qKUo3Qg57gz+9bpwPRICh5bZWXv2dZYQMo7iZZh6AJiO3oZE6Tz8A4q2xumRpW HvfY0IfHo37kn+xkdC6mbcZBYXo0KQBV/2KsgF6D9gGPLeKp3bb/DeuwLjQYu8j0KI0k bnx5lMqWKM09WiuKJPZnqa1CqxIA54VJgk/9w7ICvF8ivLOEgtbXlQZ+k6ffUB4g7pH/ FrZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BF4wPFMGvJMx+e9zXgrbf4Lj5+O/3oIlVh3I/7nAW28=; b=UkesDUVdjd7GJg/toVjtvwvQbWhjj29DfHs88AgyEdpqCCaqZndOreYpRJZC/ATAzg lqayGmqcmhjH6Mg41MZf16Hr/V4qqFCVNZnXnAYoJ1lUW/U2vV+4JnAzRHvVWJG3XWC4 LSTbl7BxJWsp+k7nEdkDRiQDvhKhuMAkT+0Bgb51JUenSiNIKPyLe25bU/ZU+yqEp8vt EyMRU9AoiarcS473Sc05t2OgPiZkwpsDhm/qTXIUOIFq/1y7G79HObT/rqarl3anh83u ah+lQynio9tmMq+UvTd1kd8ngctGwCL7KccFZKsNijSO4n4FwgktE2kMz9UZEVdHxNsE s/mQ== X-Gm-Message-State: AOAM532FbpI0yhl4/nyejvqF136tO+cIGetGySHQcvNwdqeAUl/MV1Hy vTNMVPBPXo13eWhPwz5RllypleA5szLxzWq1aRFUmg== X-Google-Smtp-Source: ABdhPJzYpjDzF/VTmmB9Zr65reHxTvduNEHmYOd+EstkNRz17MA1cqBnwnCKvsbHziUq9ZfkgYN06+i9RPZ43L1s9Yk= X-Received: by 2002:a25:2341:: with SMTP id j62mr39877955ybj.190.1626797930203; Tue, 20 Jul 2021 09:18:50 -0700 (PDT) MIME-Version: 1.0 References: <20210718214134.2619099-1-surenb@google.com> <7eb17da6-03a6-5eaf-16e6-97b53ba163d8@redhat.com> In-Reply-To: <7eb17da6-03a6-5eaf-16e6-97b53ba163d8@redhat.com> From: Suren Baghdasaryan Date: Tue, 20 Jul 2021 09:18:39 -0700 Message-ID: Subject: Re: [PATCH v2 1/3] mm, oom: move task_will_free_mem up in the file to be used in process_mrelease To: David Hildenbrand Cc: Andrew Morton , Michal Hocko , Michal Hocko , David Rientjes , Matthew Wilcox , Johannes Weiner , Roman Gushchin , Rik van Riel , Minchan Kim , Christian Brauner , Christoph Hellwig , Oleg Nesterov , Jann Horn , Shakeel Butt , Andy Lutomirski , Christian Brauner , Florian Weimer , Jan Engelhardt , Tim Murray , Linux API , linux-mm , LKML , kernel-team Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 19E39F000208 X-Stat-Signature: qr9krbfj1pjfr4gf5jppqfanddg381fd Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=ebloSyKU; spf=pass (imf11.hostedemail.com: domain of surenb@google.com designates 209.85.219.176 as permitted sender) smtp.mailfrom=surenb@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1626797930-47747 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 20, 2021 at 5:44 AM David Hildenbrand wrote: > > On 18.07.21 23:41, Suren Baghdasaryan wrote: > > process_mrelease needs to be added in the CONFIG_MMU-dependent block which > > comes before __task_will_free_mem and task_will_free_mem. Move these > > functions before this block so that new process_mrelease syscall can use > > them. > > > > Signed-off-by: Suren Baghdasaryan > > --- > > changes in v2: > > - Fixed build error when CONFIG_MMU=n, reported by kernel test robot. This > > required moving task_will_free_mem implemented in the first patch > > - Renamed process_reap to process_mrelease, per majority of votes > > - Replaced "dying process" with "process which was sent a SIGKILL signal" in > > the manual page text, per Florian Weimer > > - Added ERRORS section in the manual page text > > - Resolved conflicts in syscall numbers caused by the new memfd_secret syscall > > - Separated boilerplate code wiring-up the new syscall into a separate patch > > to facilitate the review process > > > > mm/oom_kill.c | 150 +++++++++++++++++++++++++------------------------- > > 1 file changed, 75 insertions(+), 75 deletions(-) > > TBH, I really dislike this move as it makes git blame a lot harder with > any real benefit. > > Can't you just use prototypes to avoid the move for now in patch #2? > > static bool task_will_free_mem(struct task_struct *task); Sure, I can use a forward-declaration. Just thought this would be cleaner. Will change in the next rev. Thanks! > > > -- > Thanks, > > David / dhildenb >