From: David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
To: ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
vlad-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Subject: Re: [PATCH for-next] mlx4_core: Roll back round robin bitmap allocation commit for CQs, SRQs, and MPTs
Date: Mon, 09 Dec 2013 21:12:33 -0500 (EST) [thread overview]
Message-ID: <20131209.211233.415056494606198185.davem@davemloft.net> (raw)
In-Reply-To: <1386514217-23739-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date: Sun, 8 Dec 2013 16:50:17 +0200
> From: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
>
> Commit f4ec9e9 "mlx4_core: Change bitmap allocator to work in round-robin fashion"
> introduced round-robin allocation (via bitmap) for all resources which allocate
> via a bitmap.
>
> Round robin allocation is desirable for mcgs, counters, pd's, UARs, and xrcds.
> These are simply numbers, with no involvement of ICM memory mapping.
>
> Round robin is required for QPs, since we had a problem with immediate
> reuse of a 24-bit QP number (commit f4ec9e9).
>
> However, for other resources which use the bitmap allocator and involve
> mapping ICM memory -- MPTs, CQs, SRQs -- round-robin is not desirable.
>
> What happens in these cases is the following:
>
> ICM memory is allocated and mapped in chunks of 256K.
>
> Since the resource allocation index goes up monotonically, the allocator
> will eventually require mapping a new chunk. Now, chunks are also unmapped
> when their reference count goes back to zero. Thus, if a single app is
> running and starts/exits frequently we will have the following situation:
>
> When the app starts, a new chunk must be allocated and mapped.
>
> When the app exits, the chunk reference count goes back to zero, and the
> chunk is unmapped and freed. Therefore, the app must pay the cost of allocation
> and mapping of ICM memory each time it runs (although the price is paid only when
> allocating the initial entry in the new chunk).
>
> For apps which allocate MPTs/SRQs/CQs and which operate as described above,
> this presented a performance problem.
>
> We therefore roll back the round-robin allocator modification for MPTs, CQs, SRQs.
>
> Reported-by: Matthew Finlay <matt-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> Signed-off-by: Jack Morgenstein <jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> Signed-off-by: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-12-10 2:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-08 14:50 [PATCH for-next] mlx4_core: Roll back round robin bitmap allocation commit for CQs, SRQs, and MPTs Or Gerlitz
[not found] ` <1386514217-23739-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-12-10 2:12 ` David Miller [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=20131209.211233.415056494606198185.davem@davemloft.net \
--to=davem-ft/pcqaiutieiz0/mpfg9q@public.gmane.org \
--cc=jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=vlad-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
/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).