From: Pavel Machek <pavel@ucw.cz>
To: Michal Hocko <mhocko@kernel.org>
Cc: kernel list <linux-kernel@vger.kernel.org>,
jcliburn@gmail.com, chris.snook@gmail.com,
netdev@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-mm@kvack.org, nic-devel@qualcomm.com, ronangeles@gmail.com,
ebiederm@xmission.com
Subject: Re: 4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation
Date: Sat, 28 Nov 2015 15:50:03 +0100 [thread overview]
Message-ID: <20151128145003.GA4135@amd> (raw)
In-Reply-To: <20151127082010.GA2500@dhcp22.suse.cz>
Hi!
> > /*
> > * real ring DMA buffer
> > * each ring/block may need up to 8 bytes for alignment, hence the
> > * additional bytes tacked onto the end.
> > */
> > ring_header->size = size =
> > sizeof(struct atl1c_tpd_desc) * tpd_ring->count * 2 +
> > sizeof(struct atl1c_rx_free_desc) * rx_desc_count +
> > sizeof(struct atl1c_recv_ret_status) * rx_desc_count +
> > 8 * 4;
> >
> > ring_header->desc = pci_alloc_consistent(pdev, ring_header->size,
> > &ring_header->dma);
>
> Why is pci_alloc_consistent doing an unconditional GFP_ATOMIC
> allocation? atl1_setup_ring_resources already does GFP_KERNEL
> allocation in the same function so this should be sleepable
> context. I think we should either add pci_alloc_consistent_gfp if
> there are no explicit reasons to not do so or you can workaround
There's existing interface "dma_alloc_coherent" which can be used.
I did not yet try with __GFP_REPEAT, but GFP_KERNEL should already be
big improvement.
Let me send a patch..
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Pavel Machek <pavel@ucw.cz>
To: Michal Hocko <mhocko@kernel.org>
Cc: kernel list <linux-kernel@vger.kernel.org>,
jcliburn@gmail.com, chris.snook@gmail.com,
netdev@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-mm@kvack.org, nic-devel@qualcomm.com, ronangeles@gmail.com,
ebiederm@xmission.com
Subject: Re: 4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation
Date: Sat, 28 Nov 2015 15:50:03 +0100 [thread overview]
Message-ID: <20151128145003.GA4135@amd> (raw)
In-Reply-To: <20151127082010.GA2500@dhcp22.suse.cz>
Hi!
> > /*
> > * real ring DMA buffer
> > * each ring/block may need up to 8 bytes for alignment, hence the
> > * additional bytes tacked onto the end.
> > */
> > ring_header->size = size =
> > sizeof(struct atl1c_tpd_desc) * tpd_ring->count * 2 +
> > sizeof(struct atl1c_rx_free_desc) * rx_desc_count +
> > sizeof(struct atl1c_recv_ret_status) * rx_desc_count +
> > 8 * 4;
> >
> > ring_header->desc = pci_alloc_consistent(pdev, ring_header->size,
> > &ring_header->dma);
>
> Why is pci_alloc_consistent doing an unconditional GFP_ATOMIC
> allocation? atl1_setup_ring_resources already does GFP_KERNEL
> allocation in the same function so this should be sleepable
> context. I think we should either add pci_alloc_consistent_gfp if
> there are no explicit reasons to not do so or you can workaround
There's existing interface "dma_alloc_coherent" which can be used.
I did not yet try with __GFP_REPEAT, but GFP_KERNEL should already be
big improvement.
Let me send a patch..
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2015-11-28 14:50 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 16:34 4.3+: Atheros ethernet fails after resume from s2ram, due to order 4 allocation Pavel Machek
2015-11-26 16:34 ` Pavel Machek
2015-11-26 16:34 ` Pavel Machek
2015-11-26 21:56 ` Francois Romieu
2015-11-26 21:56 ` Francois Romieu
2015-11-27 8:20 ` Michal Hocko
2015-11-27 8:20 ` Michal Hocko
2015-11-28 14:50 ` Pavel Machek [this message]
2015-11-28 14:50 ` Pavel Machek
2015-11-28 14:51 ` [PATCH] Improve Atheros ethernet driver not to do order 4 GFP_ATOMIC allocation Pavel Machek
2015-11-28 14:51 ` Pavel Machek
2015-11-29 21:58 ` Sergei Shtylyov
2015-11-29 21:58 ` Sergei Shtylyov
2015-11-30 13:21 ` Michal Hocko
2015-11-30 13:21 ` Michal Hocko
2015-12-01 20:35 ` David Miller
2015-12-01 20:35 ` David Miller
2015-12-02 22:43 ` Chris Snook
2015-12-03 7:49 ` Pavel Machek
2015-12-03 7:49 ` Pavel Machek
2015-12-03 7:49 ` Pavel Machek
2015-12-03 8:16 ` Michal Hocko
2015-12-03 8:16 ` Michal Hocko
2015-12-03 8:16 ` Michal Hocko
2015-12-03 19:26 ` Chris Snook
2015-11-30 17:58 ` Eric Dumazet
2015-11-30 17:58 ` Eric Dumazet
2015-12-01 20:36 ` David Miller
2015-12-01 20:36 ` David Miller
2015-12-03 15:59 ` Pavel Machek
2015-12-03 15:59 ` Pavel Machek
2015-12-03 15:59 ` [PATCH net] atl1c: Improve " Pavel Machek
2015-12-03 15:59 ` Pavel Machek
2015-12-03 16:13 ` Michal Hocko
2015-12-03 16:13 ` Michal Hocko
2015-12-03 17:17 ` Eric Dumazet
2015-12-03 17:17 ` Eric Dumazet
2015-12-03 17:32 ` David Miller
2015-12-03 17:32 ` David Miller
2015-12-04 8:11 ` Pavel Machek
2015-12-04 8:11 ` Pavel Machek
2015-12-04 16:21 ` David Miller
2015-12-04 16:21 ` David Miller
2015-12-04 21:30 ` Pavel Machek
2015-12-04 21:30 ` Pavel Machek
2015-12-04 22:01 ` David Miller
2015-12-04 22:01 ` David Miller
2015-12-04 8:50 ` Pavel Machek
2015-12-04 8:50 ` Pavel Machek
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=20151128145003.GA4135@amd \
--to=pavel@ucw.cz \
--cc=chris.snook@gmail.com \
--cc=ebiederm@xmission.com \
--cc=jcliburn@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nic-devel@qualcomm.com \
--cc=rjw@rjwysocki.net \
--cc=ronangeles@gmail.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.