From: Roman Gushchin <klamm@yandex-team.ru>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: "alexander.h.duyck@intel.com" <alexander.h.duyck@intel.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"sassmann@kpanic.de" <sassmann@kpanic.de>,
"e1000-devel@lists.sourceforge.net"
<e1000-devel@lists.sourceforge.net>,
"peter.p.waskiewicz.jr@intel.com"
<peter.p.waskiewicz.jr@intel.com>,
"bruce.w.allan@intel.com" <bruce.w.allan@intel.com>,
"jesse.brandeburg@intel.com" <jesse.brandeburg@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"john.ronciak@intel.com" <john.ronciak@intel.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] igb: don't reuse pages with pfmemalloc flag
Date: Thu, 23 Oct 2014 11:52:03 +0400 [thread overview]
Message-ID: <4321414050723@webcorp02h.yandex-team.ru> (raw)
In-Reply-To: <1414002630.2179.0.camel@jtkirshe-mobl>
Thank you!
Probably we should add it to stable trees too?
--
Regards,
Roman
22.10.2014, 22:30, "Jeff Kirsher" <jeffrey.t.kirsher@intel.com>:
> On Wed, 2014-10-22 at 17:50 +0400, Roman Gushchin wrote:
>> Incoming packet is dropped silently by sk_filter(), if the skb was
>> allocated from pfmemalloc reserves and the corresponding socket is
>> not marked with the SOCK_MEMALLOC flag.
>>
>> Igb driver allocates pages for DMA with __skb_alloc_page(), which
>> calls alloc_pages_node() with the __GFP_MEMALLOC flag. So, in case
>> of OOM condition, igb can get pages with pfmemalloc flag set.
>>
>> If an incoming packet hits the pfmemalloc page and is large enough
>> (small packets are copying into the memory, allocated with
>> netdev_alloc_skb_ip_align(), so they are not affected), it will be
>> dropped.
>>
>> This behavior is ok under high memory pressure, but the problem is
>> that the igb driver reuses these mapped pages. So, packets are still
>> dropping even if all memory issues are gone and there is a plenty
>> of free memory.
>>
>> In my case, some TCP sessions hang on a small percentage (< 0.1%)
>> of machines days after OOMs.
>>
>> Fix this by avoiding reuse of such pages.
>>
>> Signed-off-by: Roman Gushchin <klamm@yandex-team.ru>
>> ---
>> drivers/net/ethernet/intel/igb/igb_main.c | 6 +++++-
>> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> Thanks Roman, I have added you patch to my queue.
------------------------------------------------------------------------------
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
prev parent reply other threads:[~2014-10-23 7:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-22 13:50 [PATCH] igb: don't reuse pages with pfmemalloc flag Roman Gushchin
2014-10-22 15:45 ` Eric Dumazet
2014-10-23 11:21 ` Roman Gushchin
2014-10-23 13:30 ` [PATHC] net: napi_reuse_skb() should check pfmemalloc Eric Dumazet
2014-10-23 13:49 ` Roman Gushchin
2014-10-27 2:47 ` David Miller
2014-10-22 18:30 ` [PATCH] igb: don't reuse pages with pfmemalloc flag Jeff Kirsher
2014-10-23 7:52 ` Roman Gushchin [this message]
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=4321414050723@webcorp02h.yandex-team.ru \
--to=klamm@yandex-team.ru \
--cc=alexander.h.duyck@intel.com \
--cc=bruce.w.allan@intel.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=gregkh@linuxfoundation.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=john.ronciak@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peter.p.waskiewicz.jr@intel.com \
--cc=sassmann@kpanic.de \
/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