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=unavailable 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 DAE93C636C9 for ; Tue, 20 Jul 2021 12:44:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B7DCE61186 for ; Tue, 20 Jul 2021 12:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238167AbhGTMDV (ORCPT ); Tue, 20 Jul 2021 08:03:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24258 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbhGTMDT (ORCPT ); Tue, 20 Jul 2021 08:03:19 -0400 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-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-oP6RlVx1MjWqvB7zy-R22Q-1; Tue, 20 Jul 2021 08:43:55 -0400 X-MC-Unique: oP6RlVx1MjWqvB7zy-R22Q-1 Received: by mail-wm1-f69.google.com with SMTP id j42-20020a05600c1c2ab0290238db573ab7so452591wms.5 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=dFvdzbH3z5QpGrqZQ4JB1+3ppna5TRL6cDVerRWYLpm9NJVjAMUMcRQqqIvghtSoPv C65qMuTkZjfd40URr55ytUU6CylIxQ9E6afhODLnIbKNwLsLq4LIG/WFWSCTchb9uO1l yH7Z7EpDoEKZJBm+WKjQNjUazuA4lqKTZg/jAwwcrLy4Y/b/HrzXITBHVajlXMVlw776 3L8jp9x6YKiURd/jk1OjYxGq2NyqzYayEy0HGcgQYx/6lpPRpd3azxuJl/UwG1ziB4Wn /PgONRkMJm56Q5fKy0wp6J+LNTRb81xlIlPVWA12doZjvDqxkO9TZcZqk/HSKu7pqlzJ kA3g== X-Gm-Message-State: AOAM5304QQHhLGGYLVbUc/Ex33B0IrqN18pu5wcLpN5cZcgeR1qnKKmX D61myZLhRjYmthQUldpBO3TC2NtdMqkPR0HRhT1k2Q3FZWNHnIbYpmP8p8neh1+d+7NZg7LYHH/ A0b6ka2B+eZ3hQZ5IZCaLXnOz X-Received: by 2002:adf:fe0d:: with SMTP id n13mr35178426wrr.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> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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