netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Huangzhaoyang <huangzhaoyang@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: remove judgement based on gfp_flags
Date: Thu, 23 Dec 2021 09:11:00 -0800	[thread overview]
Message-ID: <20211223091100.4a86188f@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <1640224567-3014-1-git-send-email-huangzhaoyang@gmail.com>

On Thu, 23 Dec 2021 09:56:07 +0800 Huangzhaoyang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> 
> The parameter allocation here is used for indicating if the memory
> allocation can stall or not. Since we have got the skb buffer, it
> doesn't make sense to check if we can yield on the net's congested
> via gfp_flags. Remove it now.

This is checking if we can sleep AFAICT. What are you trying to fix?

> diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
> index 4c57532..af5b6af 100644
> --- a/net/netlink/af_netlink.c
> +++ b/net/netlink/af_netlink.c
> @@ -1526,7 +1526,7 @@ int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, u32 portid,
>  	consume_skb(info.skb2);
>  
>  	if (info.delivered) {
> -		if (info.congested && gfpflags_allow_blocking(allocation))
> +		if (info.congested)
>  			yield();
>  		return 0;
>  	}


  reply	other threads:[~2021-12-23 17:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-23  1:56 [PATCH] net: remove judgement based on gfp_flags Huangzhaoyang
2021-12-23 17:11 ` Jakub Kicinski [this message]
2021-12-27  6:14   ` Zhaoyang Huang
2021-12-27  7:38     ` Zhaoyang Huang
2021-12-28  2:02       ` Jakub Kicinski
2022-01-04  2:57 ` [net] 6f87debdea: BUG:scheduling_while_atomic kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211223091100.4a86188f@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=huangzhaoyang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=zhaoyang.huang@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).