All of lore.kernel.org
 help / color / mirror / Atom feed
From: poma <pomidorabelisima@gmail.com>
To: netdev@vger.kernel.org, David Miller <davem@davemloft.net>,
	Francois Romieu <romieu@fr.zoreil.com>,
	Mike Massonnet <m8t@gandi.net>,
	Benedikt Meurer <benedikt.meurer@unix-ag.uni-siegen.de>,
	Bernhard Walle <bernhard.walle@gmx.de>,
	Hendrik Scholz <hscholz@raisdorf.net>,
	Florian Rivoal <frivoal@xfce.org>
Subject: Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval.
Date: Mon, 7 Sep 2015 16:43:13 +0200	[thread overview]
Message-ID: <55EDA281.3030706@gmail.com> (raw)
In-Reply-To: <20150907085023.GA17511@calimero.vinschen.de>

On 07.09.2015 10:50, Corinna Vinschen wrote:
> On Sep  7 09:13, poma wrote:
>> On 06.09.2015 12:19, Corinna Vinschen wrote:
>>> On Sep  4 22:59, Francois Romieu wrote:
>>>>  Applies against davem's net as of f1ccbfce2fc787981d1182d09c1f6b67766783a8.
>>>>
>>>>  drivers/net/ethernet/realtek/r8169.c | 2 +-
>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
>>>> index 24dcbe6..56829ea 100644
>>>> --- a/drivers/net/ethernet/realtek/r8169.c
>>>> +++ b/drivers/net/ethernet/realtek/r8169.c
>>>> @@ -2200,7 +2200,7 @@ static struct rtl8169_counters *rtl8169_map_counters(struct net_device *dev,
>>>>  	struct rtl8169_counters *counters;
>>>>  	u32 cmd;
>>>>  
>>>> -	counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_KERNEL);
>>>> +	counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_ATOMIC);
>>>>  	if (counters) {
>>>>  		RTL_W32(CounterAddrHigh, (u64)*paddr >> 32);
>>>>  		cmd = (u64)*paddr & DMA_BIT_MASK(32);
>>>> -- 
>>>> 2.4.3
>>> [...]
>> 1. Reverted to r8169.c?id=eb78139
>>    - the noise is still present
>> 2. Patches applied - Francois Romieu (3):
>>    r8169: decouple the counters data and the device private area.
>>    r8169: move rtl_reset_counters_cond before the hardware counters helpers.
>>    r8169: increase the lifespan of the hardware counters dump area.
>>    - the noise is still present
> 
> Sure you tested the right code?  I'm just asking because...
> 
>> [   70.016445]  [<ffffffff81847841>] dump_stack+0x4b/0x63
>> [   70.016456]  [<ffffffff811008c7>] lockdep_rcu_suspicious+0xd7/0x110
>> [   70.016465]  [<ffffffff810d5297>] ___might_sleep+0xa7/0x230
>> [   70.016472]  [<ffffffff810d5469>] __might_sleep+0x49/0x80
>> [   70.016481]  [<ffffffff811e54ce>] __alloc_pages_nodemask+0x2fe/0xb90
>> [   70.016490]  [<ffffffff8112197d>] ? debug_lockdep_rcu_enabled+0x1d/0x20
>> [   70.016499]  [<ffffffff81024ab9>] ? sched_clock+0x9/0x10
>> [   70.016507]  [<ffffffff810e24ac>] ? local_clock+0x1c/0x20
>> [   70.016514]  [<ffffffff8112197d>] ? debug_lockdep_rcu_enabled+0x1d/0x20
>> [   70.016524]  [<ffffffff810218e6>] dma_generic_alloc_coherent+0x96/0x130
>> [   70.016534]  [<ffffffff81069865>] x86_swiotlb_alloc_coherent+0x25/0x50
>> [   70.016541]  [<ffffffff810215fd>] dma_alloc_attrs+0x6d/0xe0
>> [   70.016555]  [<ffffffffa003525e>] rtl8169_map_counters+0x3e/0x70 [r8169]
> 
> ...rtl8169_map_counters only exists before Francois patch.  The patch
> removes this function.
> 
> 
> Corinna
> 

I do not know, is this OK?

$ rpm -i https://kojipkgs.fedoraproject.org/packages/kernel/4.3.0/0.rc0.git7.1.fc24/src/kernel-4.3.0-0.rc0.git7.1.fc24.src.rpm
$ rpmbuild -bp rpmbuild/SPECS/kernel.spec
$ cd rpmbuild/BUILD/kernel-4.2.fc24/linux-4.3.0-0.rc0.git7.1.fc24.x86_64/

$ curl -s "http://marc.info/?l=linux-netdev&m=144145559429943&q=raw" | patch -p1
patching file drivers/net/ethernet/realtek/r8169.c
patch unexpectedly ends in middle of line
$ curl -s "http://marc.info/?l=linux-netdev&m=144145559729944&q=raw" | patch -p1
patching file drivers/net/ethernet/realtek/r8169.c
patch unexpectedly ends in middle of line
$ curl -s "http://marc.info/?l=linux-netdev&m=144145558929942&q=raw" | patch -p1
patching file drivers/net/ethernet/realtek/r8169.c
patch unexpectedly ends in middle of line

$ sed -i 's/PATCHLEVEL = 2/PATCHLEVEL = 3/' Makefile
$ sed -i 's/EXTRAVERSION =/EXTRAVERSION = -0.rc0.git7.1.fc24.x86_64/' Makefile

$ make -j drivers/net/ethernet/realtek/r8169.ko
$ su
# cp drivers/net/ethernet/realtek/r8169.ko /usr/lib/modules/4.3.0-0.rc0.git7.1.fc24.x86_64/updates/
# depmod 

# dracut -f --kver 4.3.0-0.rc0.git7.1.fc24.x86_64 
# lsinitrd --kver 4.3.0-0.rc0.git7.1.fc24.x86_64 | grep r8169
... usr/lib/modules/4.3.0-0.rc0.git7.1.fc24.x86_64/updates/r8169.ko

# systemctl reboot

  reply	other threads:[~2015-09-07 14:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-04 14:05 BUG: sleeping function called from invalid context at mm/page_alloc.c:3186 poma
2015-09-04 18:36 ` David Miller
2015-09-04 20:59   ` [PATCH net 1/1] r8169: fix sleepable allocation during netdevice stats retrieval Francois Romieu
2015-09-04 22:22     ` David Miller
2015-09-04 23:11       ` Francois Romieu
2015-09-04 23:15         ` David Miller
2015-09-06 10:19     ` Corinna Vinschen
2015-09-06 20:20       ` Francois Romieu
2015-09-07  7:13       ` poma
2015-09-07  8:50         ` Corinna Vinschen
2015-09-07 14:43           ` poma [this message]
2015-09-08  6:36             ` poma
2015-09-09 15:24               ` poma
2015-09-09 15:54                 ` Corinna Vinschen
2015-09-09 15:55                   ` Corinna Vinschen
2015-09-09 18:34                     ` poma
2015-09-09 19:04                       ` David Miller
2015-09-10  0:38                         ` poma
2015-09-09 19:08                       ` Corinna Vinschen
2015-09-09 23:11                         ` poma
2015-09-09 23:51                           ` poma
2015-09-10  8:47                             ` Corinna Vinschen
2015-09-10 12:36                               ` poma
2015-09-10 14:29                                 ` Corinna Vinschen

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=55EDA281.3030706@gmail.com \
    --to=pomidorabelisima@gmail.com \
    --cc=benedikt.meurer@unix-ag.uni-siegen.de \
    --cc=bernhard.walle@gmx.de \
    --cc=davem@davemloft.net \
    --cc=frivoal@xfce.org \
    --cc=hscholz@raisdorf.net \
    --cc=m8t@gandi.net \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.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.