Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1138421pxf; Fri, 9 Apr 2021 00:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybAq9CmVtlA88UqvSXU66mBVYb/IxNS5SdqHiqicV1P6s+okztkMpGrraDULupjxzmBg/u X-Received: by 2002:a63:5857:: with SMTP id i23mr11919312pgm.152.1617953563804; Fri, 09 Apr 2021 00:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617953563; cv=none; d=google.com; s=arc-20160816; b=ZLqxXHhlBxyF5JUgBPee5UgB+zlBXn6o4UZ8M+KICuJf02gxDIErTRbLOCQugfY6FL f9GuJUSPFsrx3VYxgXLG4mZZ7Gg8SKBVQIBzoujxZKajap17DZ3IrhEuEmu+PD5JHTH1 g35g4106bMlof7ZT67gfdCFLzZmqemmY95t7SekT6JN90VSYZU3xD9bTWppZ94HZIQqW yMKom2p6y+4GsEbRq4o9MT0FRg22wTy2GVU9NQuGB69bYwFvCRl6WXI737eB18sFqwGc BCOMq0JEhTc208CrDq6FcRvUt6A4fuKAXvF85EdH6QKqQffaJhFnRZ/h763QPJRWxmOo HwEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=c3yMnvOQyW2YQjlzdXbutOQv+tPhvUzyjjucRWFy6mE=; b=MzspIxemzrmXrdqKFGBo+oWEI1i/7DIz9oAEUvgB7NmwrM8Q0ZmoF3Igg1j36AxKdu bO11/7vsg3a1PBrKSgZp5YMdLGE0e4es3R6MiHIa2z/gR9kCp0fq4L/I7KG5skdsqtox sJOTq+KqjeOETYQL/qhp3xa7oXdjeA3i6wYA1pc2XsKn08RrK+VBZDDWXOU0ISY8dGVP wiRQ0v/TOcBpbUzgmHWaGDCqzz12H13/1+CnoYAcxEd4yB6LON2Kgc0qoQRMumczmAQC 7sLkjxIinHC47Z0KCk2ntV5d/xMuM/dMHengFVMiL67vWxLVZpXE2FgJBBNv4fQ/QVAo Qdsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id nv15si2409918pjb.86.2021.04.09.00.32.31; Fri, 09 Apr 2021 00:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231716AbhDIHbC (ORCPT + 99 others); Fri, 9 Apr 2021 03:31:02 -0400 Received: from outbound-smtp30.blacknight.com ([81.17.249.61]:59475 "EHLO outbound-smtp30.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbhDIHbB (ORCPT ); Fri, 9 Apr 2021 03:31:01 -0400 Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp30.blacknight.com (Postfix) with ESMTPS id 90E8CBA9D0 for ; Fri, 9 Apr 2021 08:30:48 +0100 (IST) Received: (qmail 1573 invoked from network); 9 Apr 2021 07:30:48 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.22.4]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 9 Apr 2021 07:30:48 -0000 Date: Fri, 9 Apr 2021 08:30:46 +0100 From: Mel Gorman To: Xie He Cc: Mel Gorman , jslaby@suse.cz, Neil Brown , Peter Zijlstra , Mike Christie , Eric B Munson , Eric Dumazet , Sebastian Andrzej Siewior , Christoph Lameter , Andrew Morton , "David S. Miller" , Jakub Kicinski , Linux Kernel Network Developers , LKML Subject: Re: Problem in pfmemalloc skb handling in net/core/dev.c Message-ID: <20210409073046.GI3697@techsingularity.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 08, 2021 at 11:52:01AM -0700, Xie He wrote: > Hi Mel Gorman, > > I may have found a problem in pfmemalloc skb handling in > net/core/dev.c. I see there are "if" conditions checking for > "sk_memalloc_socks() && skb_pfmemalloc(skb)", and when the condition > is true, the skb is handled specially as a pfmemalloc skb, otherwise > it is handled as a normal skb. > > However, if "sk_memalloc_socks()" is false and "skb_pfmemalloc(skb)" > is true, the skb is still handled as a normal skb. Is this correct? Under what circumstances do you expect sk_memalloc_socks() to be false and skb_pfmemalloc() to be true that would cause a problem? -- Mel Gorman SUSE Labs