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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBCE6ECAAA1 for ; Fri, 9 Sep 2022 11:37:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6C42A8D0003; Fri, 9 Sep 2022 07:37:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 673C28D0002; Fri, 9 Sep 2022 07:37:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53C5F8D0003; Fri, 9 Sep 2022 07:37:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 4431B8D0002 for ; Fri, 9 Sep 2022 07:37:28 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 217CE412C6 for ; Fri, 9 Sep 2022 11:37:28 +0000 (UTC) X-FDA: 79892346576.09.965AF93 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf31.hostedemail.com (Postfix) with ESMTP id CC56620099 for ; Fri, 9 Sep 2022 11:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662723447; 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=rmn7xPeaGEOUt1FeZIgwphGHIp83y3fKQu5eVjeuDCc=; b=M0NwyFIFgs4m41QlVF/AZX2Fq/UgppPmy/fk0QSNM1WosT7bg93ZdJT7X8sjxpmmH4r+0f pNZvSlSeLgK01gmKGsXz6upI6bIcz81c9hCJaGdPTccdpcABLCxucsnY92gN8AbPLddCfH WWxv/ftQmRTJyLEnMT1x2Z3plBG6TJQ= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-387-_rfEZe9aMGq7c_HkADm5RA-1; Fri, 09 Sep 2022 07:37:26 -0400 X-MC-Unique: _rfEZe9aMGq7c_HkADm5RA-1 Received: by mail-wr1-f72.google.com with SMTP id u27-20020adfa19b000000b0022863c08ac4so288746wru.11 for ; Fri, 09 Sep 2022 04:37:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date; bh=rmn7xPeaGEOUt1FeZIgwphGHIp83y3fKQu5eVjeuDCc=; b=wTQ9GlKFWk3AM5VqSV6SERxx/L9yqOVfgvJc1de37+heM42dKMXqMbgwhitrgni+Nk 8YKgszKHw2zVy2/vLlSFtHB1yOogdGKIYnjwnEYD5YDt2s+wxXQn5wN8Hp4J3HqimA9s 3gq7dMtGqFuDt5biSPIBffI7T4D7aQD92DsTtgzG9J7vT7Fj29sGlEZPZ4S1hCRy6Gk8 kk/rd6Z9gJVUa4VXb9yJsuaI/moxuc4bQVoZFQuCys5ZewnqvsP50//HbKByfVTRDgI0 CmDPahmgPxtfLqi3F/rjh+fIfrO2pQHOGdz4UKX3KG12/5r3Z3zgB0BKp0tC2qNnfYFi OswA== X-Gm-Message-State: ACgBeo20YUXMsn6/vLCvrkpYWAbgh4IcnPyuWKskxIru+mwPEw4GSrLJ J2ktKD7KCr/CoDCt2mmJMomGRMQ+S1Pk4ikD416WAquGJBUH3imJBQD9VY6Ja9V80uz0v1Kd8v5 Z40uSt6V9NGQ= X-Received: by 2002:adf:fb46:0:b0:228:6443:c934 with SMTP id c6-20020adffb46000000b002286443c934mr8122916wrs.431.1662723445229; Fri, 09 Sep 2022 04:37:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7yHVrKh63b9uyZ7+DQ+CvKaM7ehysVEY8HPVVovIGOLYxSqT/RanvllDyoK5CcnfFkPoz0vw== X-Received: by 2002:adf:fb46:0:b0:228:6443:c934 with SMTP id c6-20020adffb46000000b002286443c934mr8122905wrs.431.1662723444925; Fri, 09 Sep 2022 04:37:24 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:6300:1fe0:42e1:62c5:91b6? (p200300cbc70463001fe042e162c591b6.dip0.t-ipconnect.de. [2003:cb:c704:6300:1fe0:42e1:62c5:91b6]) by smtp.gmail.com with ESMTPSA id u12-20020a5d468c000000b00228c375d81bsm324083wrq.2.2022.09.09.04.37.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Sep 2022 04:37:24 -0700 (PDT) Message-ID: Date: Fri, 9 Sep 2022 13:37:23 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH 15/16] mm/page_alloc: remove obsolete gfpflags_normal_context() To: Miaohe Lin , akpm@linux-foundation.org Cc: osalvador@suse.de, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20220909092451.24883-1-linmiaohe@huawei.com> <20220909092451.24883-16-linmiaohe@huawei.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220909092451.24883-16-linmiaohe@huawei.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1662723447; a=rsa-sha256; cv=none; b=Uo3FGgRbJCfOnrGb3YugF0yQWEtRx8ZX7hOBNoCH1UN5D/5SraWPd3IgVDN+p/MiShAlNA s1bZ58xWv6IJW/XzdOubj/JRUXB6ycUOKpuA4hPl8cfCjC8C6GqE2Vu/ODyVF3MiyPVZ/g 82YpiiP4tBl0JleqZLImfc4VcEBu3Hk= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=M0NwyFIF; spf=pass (imf31.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1662723447; h=from:from:sender: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:dkim-signature; bh=rmn7xPeaGEOUt1FeZIgwphGHIp83y3fKQu5eVjeuDCc=; b=aBg0yRRfiBRvJO5Jpyv2zPbxxTj7Tr5714svdGE5vDVwjF+Um5BHzPVRV8N3qE2ihrzhq0 XwGdPse2qbdc/omeBuzU7tWDzjTQRbcTa1zdYaZRWN77PPU4qYeHzmrNGeSuYH9kEvKI6c KjGYNDJWDF18KwjDwabe4gg0Npr0cRI= X-Rspamd-Server: rspam03 X-Rspam-User: X-Stat-Signature: bm7ak653o7i7tstucxyq97kqc6o45bi8 X-Rspamd-Queue-Id: CC56620099 Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=M0NwyFIF; spf=pass (imf31.hostedemail.com: domain of david@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-HE-Tag: 1662723447-705011 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 09.09.22 11:24, Miaohe Lin wrote: > Since commit dacb5d8875cc ("tcp: fix page frag corruption on page > fault"), there's no caller of gfpflags_normal_context(). Remove it > as this helper is strictly tied to the sk page frag usage and there > won't be other user in the future. > > Signed-off-by: Miaohe Lin > --- > include/linux/gfp.h | 23 ----------------------- > 1 file changed, 23 deletions(-) > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index ea6cb9399152..ef4aea3b356e 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -36,29 +36,6 @@ static inline bool gfpflags_allow_blocking(const gfp_t gfp_flags) > return !!(gfp_flags & __GFP_DIRECT_RECLAIM); > } > > -/** > - * gfpflags_normal_context - is gfp_flags a normal sleepable context? > - * @gfp_flags: gfp_flags to test > - * > - * Test whether @gfp_flags indicates that the allocation is from the > - * %current context and allowed to sleep. > - * > - * An allocation being allowed to block doesn't mean it owns the %current > - * context. When direct reclaim path tries to allocate memory, the > - * allocation context is nested inside whatever %current was doing at the > - * time of the original allocation. The nested allocation may be allowed > - * to block but modifying anything %current owns can corrupt the outer > - * context's expectations. > - * > - * %true result from this function indicates that the allocation context > - * can sleep and use anything that's associated with %current. > - */ > -static inline bool gfpflags_normal_context(const gfp_t gfp_flags) > -{ > - return (gfp_flags & (__GFP_DIRECT_RECLAIM | __GFP_MEMALLOC)) == > - __GFP_DIRECT_RECLAIM; > -} > - > #ifdef CONFIG_HIGHMEM > #define OPT_ZONE_HIGHMEM ZONE_HIGHMEM > #else Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb