Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1226104pxf; Fri, 9 Apr 2021 03:18:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiEpasaUa/EuSX4VChOWlNiDA4crDBeLwTUINw57FBUXzNDJegXqaM1wRaw1BQc336acki X-Received: by 2002:a17:90a:aa81:: with SMTP id l1mr13398013pjq.190.1617963498672; Fri, 09 Apr 2021 03:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617963498; cv=none; d=google.com; s=arc-20160816; b=o3cOu79xpdtk0wMj/Tr5dwcQzlPQNRBwyNffsllRQJDu9p4jHw2lDrHa9m9wYIPsTo SKQA+NMft8j5XFco00q6C5Y1uIBpDAx2oSAVvoZu15ROVKQTEwH04nHG5zJZIu8TewBI h3tJUPjxRfeBP3p9lF/7Q6xEROiO2mrfHti5uoezk1j0P59FMONs2Ri1gVxY6Y5DJ0/6 AJyUbGNUocCyLv9x3sMRe907kCcZVrkz9E0bjk41f1eyeAU6dgBfDP3Lv4i2lbFb+Ndv jly3u+wP5u8vHcL6/V87bVOrRksEUzrvrENbUjE/5104zcGqbSSO2zp/9/JUr8vOudVt bWSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=n7cLDIdYcgU+mE5TUxJG9IpNvG+bT4Z9CaGQY0UABEM=; b=t/dLYNOxwOaFT/P0KXKDiVuQ7CIdIp7TJUCA/IiHtKn6eVoxgAF03xftgxq8ja0BAT gDAaoXHjfDC8W2ukihXdon9GtBiJviSMDiotbbjxw/8UeE/KihEkRLOplJC8rsyrlDUr oJu067WfjU4c7a+6ko/rYPCrtEjtq/EGxl11XyQTgInNtTmDbjOr4FMI9hqJBnRA6MeV qYppPImOt/hzXVzfdEBffSsDWk3rzKCP7vRfCU5ysgDLk1pcuzXqFBROEHn+6BsP5tE/ jTcuOvMxM8DbmkwgpwPv2pd3uta6L7HWcZLXSQxmfOsr7v0MhEyQdNSwGGMqhyYU0oB9 Vzcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eO1g9mHi; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si2312895plg.76.2021.04.09.03.18.06; Fri, 09 Apr 2021 03:18:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eO1g9mHi; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234278AbhDIKQX (ORCPT + 99 others); Fri, 9 Apr 2021 06:16:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232395AbhDIKJU (ORCPT ); Fri, 9 Apr 2021 06:09:20 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25804C0613E9; Fri, 9 Apr 2021 03:08:29 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so4760353pjb.0; Fri, 09 Apr 2021 03:08:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=n7cLDIdYcgU+mE5TUxJG9IpNvG+bT4Z9CaGQY0UABEM=; b=eO1g9mHi9rw1lcqt+vPW/flltV4uWv6nPOUvg6TJmcq62yHCCkFDBynbBSmIKt5xGw InHhSvkBgKbuJwxbpTuUBD1Ww8lI8Bvf/f6ACS9N9adDcmL0PEcll3eII8hZPIT4u2lM SWcLBK+zHMg6Mm3NVjplADrMbDa9/lrQ2J4wdCkOnLkJMPnHhyVSieRV0I+fJWoRS1RP Y5vVMC/7qOoINS0zffsOZVYo1QQAHciIJ2ny+AFQfIfrSePxjAHEA/VVX44MFXI5q/1K gMzZFUDPpjn1J0pLfCK/7lgzSGgKG9hZRGddg2oBOEQNo67k0Nx9tYCs6g7S58KeFUS4 opiw== 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=n7cLDIdYcgU+mE5TUxJG9IpNvG+bT4Z9CaGQY0UABEM=; b=t2mRTRMWlO8k2mDWFms2/YM80IhUPLZacYBWRPCXLsGjPBZ6Vg23Q/SwjDTlci1AFi PkNaDXGOnfkKotsEeqikGMAmNS1JLHV7GXs/g6eiGbTVTFd2IJvkDRK8HjADAJTHKzMU 7tqihTY3duIphtD4P4DCJt0+GdeV0rEIOlqWqrpz6s7KF7nflVchCBQJQo6CTDUl/PKA TgB8gIasVOck3Wac/uBUSqGFfJPevF2Zq01e3hxPS7XCqKpOp496rAjKocZuNlDxdAT7 QsnAfD2O4BmxqRCsBlHlAoMoHdecW2Nx3SH97949RdK+PwZW52fL8l/4flPX+g2bCz3B beyQ== X-Gm-Message-State: AOAM531RsBTktQcKOQLG30Lw7vbyr9WqL7uCx3M/b95oSEo90iaZBULq AAMAnJPBFuNxfxjehnusi0GVvyNxA3h3aAwOWCM= X-Received: by 2002:a17:90a:28a1:: with SMTP id f30mr13337448pjd.198.1617962908715; Fri, 09 Apr 2021 03:08:28 -0700 (PDT) MIME-Version: 1.0 References: <20210409073046.GI3697@techsingularity.net> <20210409084436.GK3697@techsingularity.net> <20210409095808.GL3697@techsingularity.net> In-Reply-To: <20210409095808.GL3697@techsingularity.net> From: Xie He Date: Fri, 9 Apr 2021 03:08:17 -0700 Message-ID: Subject: Re: Problem in pfmemalloc skb handling in net/core/dev.c To: Mel Gorman 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 9, 2021 at 2:58 AM Mel Gorman wrote: > > On Fri, Apr 09, 2021 at 02:14:12AM -0700, Xie He wrote: > > > > Do you mean that at the time "sk_memalloc_socks()" changes from "true" > > to "false", there would be no in-flight skbs currently being received, > > and all network communications have been paused? > > Not all network communication, but communication with swap devices > should have stopped once sk_memalloc_socks is false. But all incoming network traffic can be allocated as pfmemalloc skbs, regardless whether or not it is related to swap devices. My protocols don't need and cannot handle pfmemalloc skbs, therefore I want to make sure my protocols never receive pfmemalloc skbs. The current code doesn't seem to guarantee this.