All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: brouer@redhat.com, Saeed Mahameed <saeedm@dev.mellanox.co.il>,
	Saeed Mahameed <saeedm@mellanox.com>,
	"David S. Miller" <davem@davemloft.net>,
	Linux Netdev List <netdev@vger.kernel.org>,
	Or Gerlitz <ogerlitz@mellanox.com>, Tal Alon <talal@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>,
	Eran Ben Elisha <eranbe@mellanox.com>,
	Achiad Shochat <achiad@mellanox.com>,
	Mel Gorman <mgorman@techsingularity.net>,
	linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH net-next V2 05/11] net/mlx5e: Support RX multi-packet WQE (Striding RQ)
Date: Tue, 19 Apr 2016 18:25:32 +0200	[thread overview]
Message-ID: <20160419182532.423d3c05@redhat.com> (raw)
In-Reply-To: <1460989033.10638.120.camel@edumazet-glaptop3.roam.corp.google.com>

On Mon, 18 Apr 2016 07:17:13 -0700
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> On Mon, 2016-04-18 at 16:05 +0300, Saeed Mahameed wrote:
> > On Mon, Apr 18, 2016 at 3:48 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:  
> > > On Sun, 2016-04-17 at 17:29 -0700, Eric Dumazet wrote:
> > >  
> > >>
> > >> If really you need to allocate physically contiguous memory, have you
> > >> considered converting the order-5 pages into 32 order-0 ones ?  
> > >
> > > Search for split_page() call sites for examples.
> > >
> > >  
> > 
> > Thanks Eric, we are already evaluating split_page as we speak.
> > 
> > We did look but could not find any specific alloc_pages API that
> > allocates many physically contiguous pages with order0 ! so we assume
> > it is ok to use split_page.  
> 
> Note: I have no idea of split_page() performance :

Maybe Mel knows?  And maybe Mel have an opinion about if this is a good
or bad approach, e.g. will this approach stress the page allocator in a
bad way?

> Buddy page allocator has to aggregate pages into order-5, then we would
> undo the work, touching 32 cache lines.
> 
> You might first benchmark a simple loop doing 
> 
> loop 10,000,000 times
>  Order-5 allocation
>  split into 32 order-0
>  free 32 pages
> 
> 
> Another idea would be to have a way to control max number of order-5
> pages that a port would be using.
> 
> Since driver always own a ref on a order-5 pages, idea would be to
> maintain a circular ring of up to XXX such pages, so that we can detect
> an abnormal use and fallback to order-0 immediately.

That is part of my idea with my page-pool proposal.  In the page-pool I
want to have some watermark counter that can block/stop the OOM issue at
this RX ring level.

See slide 12 of presentation:
http://people.netfilter.org/hawk/presentations/MM-summit2016/generic_page_pool_mm_summit2016.pdf

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  Author of http://www.iptv-analyzer.org
  LinkedIn: http://www.linkedin.com/in/brouer

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2016-04-19 16:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-17 21:31 [PATCH net-next V2 00/11] Mellanox 100G mlx5 driver receive path optimizations Saeed Mahameed
2016-04-17 21:31 ` [PATCH net-next V2 01/11] net/mlx5: Introduce device queue counters Saeed Mahameed
2016-04-17 21:31 ` [PATCH net-next V2 02/11] net/mlx5e: Allocate set of queue counters per netdev Saeed Mahameed
2016-04-17 21:31 ` [PATCH net-next V2 03/11] net/mlx5e: Use only close NUMA node for default RSS Saeed Mahameed
2016-04-17 21:31 ` [PATCH net-next V2 04/11] net/mlx5e: Use function pointers for RX data path handling Saeed Mahameed
2016-04-17 21:31 ` [PATCH net-next V2 05/11] net/mlx5e: Support RX multi-packet WQE (Striding RQ) Saeed Mahameed
2016-04-18  0:29   ` Eric Dumazet
2016-04-18 12:48     ` Eric Dumazet
2016-04-18 13:05       ` Saeed Mahameed
2016-04-18 14:17         ` Eric Dumazet
2016-04-19 16:25           ` Jesper Dangaard Brouer [this message]
2016-04-19 17:39             ` Mel Gorman
2016-04-20 16:46               ` Saeed Mahameed
2016-04-19 18:30             ` Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 06/11] net/mlx5e: Added ICO SQs Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 07/11] net/mlx5e: Add fragmented memory support for RX multi packet WQE Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 08/11] net/mlx5e: Use napi_alloc_skb for RX SKB allocations Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 09/11] net/mlx5e: Remove redundant barrier Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 10/11] net/mlx5e: Delay skb->data access Saeed Mahameed
2016-04-17 21:32 ` [PATCH net-next V2 11/11] net/mlx5e: Add ethtool counter for RX buffer allocation failures Saeed Mahameed

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=20160419182532.423d3c05@redhat.com \
    --to=brouer@redhat.com \
    --cc=achiad@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=saeedm@dev.mellanox.co.il \
    --cc=saeedm@mellanox.com \
    --cc=talal@mellanox.com \
    --cc=tariqt@mellanox.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.