Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1505058 > unrolled thread
| Started by | Bruce Fields <bfields@fieldses.org> |
|---|---|
| First post | 2016-10-20 18:00 +0200 |
| Last post | 2016-10-20 18:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] nfsd: more robust allocation failure handling in nfsd_reply_cache_init Bruce Fields <bfields@fieldses.org> - 2016-10-20 18:00 +0200
Re: [PATCH] nfsd: more robust allocation failure handling in nfsd_reply_cache_init Linus Torvalds <torvalds@linux-foundation.org> - 2016-10-20 18:10 +0200
| From | Bruce Fields <bfields@fieldses.org> |
|---|---|
| Date | 2016-10-20 18:00 +0200 |
| Subject | Re: [PATCH] nfsd: more robust allocation failure handling in nfsd_reply_cache_init |
| Message-ID | <sunV7-161-19@gated-at.bofh.it> |
On Tue, Aug 30, 2016 at 11:23:36AM -0700, Linus Torvalds wrote: > On Tue, Aug 30, 2016 at 4:48 AM, Jeff Layton <jlayton@redhat.com> wrote: > > > > While this would be good to get in, I don't see any particular urgency > > here. This seems like it'd be reasonable for v4.9. > > Agreed, looks ok to me. It certainly does not look like a new > regression or like a serious problem issue in practice. So 4.9 sounds > appropriate. Gah, Jeff points out I forgot to merge this. Jeff was also wondering whether we could instead just allocate this with vmalloc--is there any drawback? We only allocate this on nfsd startup, so if the only drawback is the allocation itself being expensive then that's no big deal. --b.
[toc] | [next] | [standalone]
| From | Linus Torvalds <torvalds@linux-foundation.org> |
|---|---|
| Date | 2016-10-20 18:10 +0200 |
| Subject | Re: [PATCH] nfsd: more robust allocation failure handling in nfsd_reply_cache_init |
| Message-ID | <suo4N-1pJ-21@gated-at.bofh.it> |
| In reply to | #1505058 |
On Thu, Oct 20, 2016 at 8:52 AM, Bruce Fields <bfields@fieldses.org> wrote:
>
> Jeff was also wondering whether we could instead just allocate this with
> vmalloc--is there any drawback? We only allocate this on nfsd startup,
> so if the only drawback is the allocation itself being expensive then
> that's no big deal.
vmalloc is ok. Generally if it's *usually* a small allocation, the
best pattern tends to be to first try to kmalloc (of get_free_pages())
using __GFP_NORETRY | __GFP_NOWARN, and then fall back on vmalloc().
That way you don't end up doing vmalloc's for things that really don't
need it.
If you do that, we have a "kvfree()" helper that is "free either
kmalloc or vmalloc area", so you don't have to track after-the-fact
which one you did.
Linus
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web