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=-18.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 3660FC636C8 for ; Tue, 20 Jul 2021 12:43:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C0E6061186 for ; Tue, 20 Jul 2021 12:43:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0E6061186 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 749976B009C; Tue, 20 Jul 2021 08:43:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 71FC46B009D; Tue, 20 Jul 2021 08:43:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 59A4B6B009E; Tue, 20 Jul 2021 08:43:59 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0064.hostedemail.com [216.40.44.64]) by kanga.kvack.org (Postfix) with ESMTP id 38AC56B009C for ; Tue, 20 Jul 2021 08:43:59 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BE5908248047 for ; Tue, 20 Jul 2021 12:43:57 +0000 (UTC) X-FDA: 78382933314.14.0527872 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 589BDD00AA57 for ; Tue, 20 Jul 2021 12:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626785036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Mlh8/IK5dN0L12USluWCom7PdCFpvByjpknGOWTGI3o=; b=CydMWymWpONdRmZngj+vNhV7uqCdMLIePrkItBMq7KFPrJCktyaKlSgM2Pi8nIQikJAuw2 COtYlQxy6pHNfDuS+Yrw9i/O/aeFMSqWJiA0prTODP4qizqJcfAYuKlm62HlKiVPr/5z30 wL5PEtASzf/3jbGW5cpIoCRnOKO9iio= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-499-nBB-s8XeMceZGfsY51iAUA-1; Tue, 20 Jul 2021 08:43:55 -0400 X-MC-Unique: nBB-s8XeMceZGfsY51iAUA-1 Received: by mail-wr1-f70.google.com with SMTP id t8-20020a05600001c8b029013e2027cf9aso10173859wrx.9 for ; Tue, 20 Jul 2021 05:43:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=Mlh8/IK5dN0L12USluWCom7PdCFpvByjpknGOWTGI3o=; b=V2y1EZKPVcSyiATjom3gE5F+LFJ4Uwsq8o1jVaxS8qwGlFsbTlYTQufektMZq+n3MJ 3C4ueyKoLmqGvEGbGb+qIyYyE8AENccSvj9hVybI5J6ml89RfdBEV/2sc9E8M2RWsHya s81S9pkb/+7oG0KgMhyb2oeCohipNNNfQqm2i5TG0RGWYp/qBHW00VJoZD0lgw9N0iPi M1qoF6VNiRFgKP4cxV7XSpTa9P1UwNNCqPLuhYE6iTWA18NPDALZOOJ6hT1chaubi8R2 CT69XgEhmCXyb9YO74Whytze9eewwUn3GuV4YzA0NYgOBLHfWjWmOFTVVBy4rMOtReCT fuTg== X-Gm-Message-State: AOAM531MieeNjj8RMk1Gdw/zRk+KZyi1zFzYp/4jgPf/BewU7zcCDTk8 xRtZS+/JLwonXABLMNxc3PmMH7mB/9ZCQGu2ephq7bkB03tYrLs6jh7xUGeQda3mY4WnUEtw2fI mxc8QbMh2nQY= X-Received: by 2002:adf:fe0d:: with SMTP id n13mr35178424wrr.73.1626785034427; Tue, 20 Jul 2021 05:43:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6XwfO0fQdP6c0wgLWHhcaNPUfqxWbaQGxVdEQ4qzR+9F2QOopKHond5XZSIPHgCH02hHk1Q== X-Received: by 2002:adf:fe0d:: with SMTP id n13mr35178414wrr.73.1626785034301; Tue, 20 Jul 2021 05:43:54 -0700 (PDT) Received: from ?IPv6:2003:d8:2f0a:7f00:fad7:3bc9:69d:31f? (p200300d82f0a7f00fad73bc9069d031f.dip0.t-ipconnect.de. [2003:d8:2f0a:7f00:fad7:3bc9:69d:31f]) by smtp.gmail.com with ESMTPSA id n23sm19827869wmc.38.2021.07.20.05.43.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Jul 2021 05:43:53 -0700 (PDT) Subject: Re: [PATCH v2 1/3] mm, oom: move task_will_free_mem up in the file to be used in process_mrelease To: Suren Baghdasaryan , akpm@linux-foundation.org Cc: mhocko@kernel.org, mhocko@suse.com, rientjes@google.com, willy@infradead.org, hannes@cmpxchg.org, guro@fb.com, riel@surriel.com, minchan@kernel.org, christian@brauner.io, hch@infradead.org, oleg@redhat.com, jannh@google.com, shakeelb@google.com, luto@kernel.org, christian.brauner@ubuntu.com, fweimer@redhat.com, jengelh@inai.de, timmurray@google.com, linux-api@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com References: <20210718214134.2619099-1-surenb@google.com> From: David Hildenbrand Organization: Red Hat Message-ID: <7eb17da6-03a6-5eaf-16e6-97b53ba163d8@redhat.com> Date: Tue, 20 Jul 2021 14:43:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210718214134.2619099-1-surenb@google.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=CydMWymW; spf=none (imf21.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Rspamd-Server: rspam02 X-Stat-Signature: wogc4d8i4ptqg9uoeg5rajbi6odr3z9o X-Rspamd-Queue-Id: 589BDD00AA57 X-HE-Tag: 1626785037-898388 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 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); -- Thanks, David / dhildenb