* Re: 3.1-rc4: spectacular kernel errors / filesystem crash
From: Jon Mason @ 2011-09-13 15:35 UTC (permalink / raw)
To: Justin Piszcz
Cc: Eric Dumazet, Jesse Brandeburg, Alan Piszcz, NetDEV list, xfs,
linux-kernel
In-Reply-To: <alpine.DEB.2.02.1109130722210.21380@p34.internal.lan>
On Tue, Sep 13, 2011 at 9:54 AM, Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
>
>
> On Tue, 13 Sep 2011, Eric Dumazet wrote:
>
>> Please Justin make sure you pulled commit
>> commit ed2888e906b56769b4ffabb9c577190438aa68b8
>> Author: Jon Mason <mason@myri.com>
>> Date: Thu Sep 8 16:41:18 2011 -0500
>>
>> PCI: Remove MRRS modification from MPS setting code
>>
>> Modifying the Maximum Read Request Size to 0 (value of 128Bytes) has
>> massive negative ramifications on some devices. Without knowing which
>> devices have this issue, do not modify from the default value when
>> walking the PCI-E bus in pcie_bus_safe mode. Also, make pcie_bus_safe
>> the default procedure.
>>
>> Tested-by: Sven Schnelle <svens@stackframe.org>
>> Tested-by: Simon Kirby <sim@hostway.ca>
>> Tested-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
>> Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com>
>> Reported-and-tested-by: Niels Ole Salscheider
>> <niels_ole@salscheider-online.
>> References: https://bugzilla.kernel.org/show_bug.cgi?id=42162
>> Signed-off-by: Jon Mason <mason@myri.com>
>> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
>
> Hello,
>
> I found this commit here:
> http://permalink.gmane.org/gmane.linux.kernel.pci/11700
This is an early version of the patch. This is the patch that you want:
https://github.com/torvalds/linux/commit/ed2888e906b56769b4ffabb9c577190438aa68b8
It appears that this patch didn't make it to lkml or linux-pci list
due to kernel.org DNS being down when it was sent.
Thanks,
Jon
>
> Applied:
> # patch -p1 < ../ed2888e906b56769b4ffabb9c577190438aa68b8.txt patching file
> drivers/pci/probe.c
>
> I will update this thread if the problem recurs, can someone also please
> advise
> which DEBUG options I should have enabled to catch further SLAB/RCU issues?
>
> So far, I have the following enabled:
>
> CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
> CONFIG_HAVE_DMA_API_DEBUG=y
> CONFIG_X86_DEBUGCTLMSR=y
> CONFIG_DEBUG_FS=y
> CONFIG_DEBUG_KERNEL=y
> CONFIG_DEBUG_SLAB=y
> CONFIG_DEBUG_SLAB_LEAK=y
> CONFIG_DEBUG_KMEMLEAK=y
> CONFIG_DEBUG_STACK_USAGE=y
> CONFIG_DEBUG_BUGVERBOSE=y
> CONFIG_DEBUG_INFO=y
> CONFIG_DEBUG_VM=y
> CONFIG_DEBUG_VIRTUAL=y
> CONFIG_DEBUG_MEMORY_INIT=y
> CONFIG_DEBUG_PER_CPU_MAPS=y
> CONFIG_DEBUG_PAGEALLOC=y
> CONFIG_DEBUG_STACKOVERFLOW=y
> CONFIG_DEBUG_RODATA=y
>
> Thanks,
>
> Justin.
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [PATCH] net: change capability used by socket options IP{,V6}_TRANSPARENT
From: Balazs Scheidler @ 2011-09-13 15:27 UTC (permalink / raw)
To: Maciej Żenczykowski; +Cc: Maciej Żenczykowski, netdev
In-Reply-To: <1314990654-32252-1-git-send-email-zenczykowski@gmail.com>
On Fri, 2011-09-02 at 12:10 -0700, Maciej Żenczykowski wrote:
> From: Maciej Żenczykowski <maze@google.com>
>
> Up till now the IP{,V6}_TRANSPARENT socket options (which actually set
> the same bit in the socket struct) have required CAP_NET_ADMIN
> privileges to set or clear the option.
>
> - we make clearing the bit not require any privileges.
> - we deprecate using CAP_NET_ADMIN for this purpose.
> - we introduce a new capability CAP_NET_TRANSPARENT,
> which is tailored to allow setting just this bit.
> - we allow either one of CAP_NET_TRANSPARENT or CAP_NET_RAW
> to set this bit, because raw sockets already effectively
> allow you to emulate socket transparency, and make the
> transition easier for apps not desiring to use a brand
> new capability (because of header file or glibc support)
> - we print a warning (but allow it) if you try to set
> the socket option with CAP_NET_ADMIN privs, but without
> either one of CAP_NET_TRANSPARENT or CAP_NET_RAW.
>
> The reason for introducing a new capability is that while
> transparent sockets are potentially dangerous (and can let you
> spoof your source IP on traffic), they don't normally give you
> the full 'freedom' of eavesdropping and/or spoofing that raw sockets
> give you.
>
> Signed-off-by: Maciej Żenczykowski <maze@google.com>
> CC: Balazs Scheidler <bazsi@balabit.hu>
This is ok for me, as long as the security maintainers allow the
introduction of this new cap.
Thanks for doing this and sorry for the late reply.
Acked-by: Balazs Scheidler <bazsi@balabit.hu>
--
Bazsi
^ permalink raw reply
* Re: 3.1-rc4: spectacular kernel errors / filesystem crash
From: Eric Dumazet @ 2011-09-13 14:58 UTC (permalink / raw)
To: Justin Piszcz
Cc: Jesse Brandeburg, Alan Piszcz, NetDEV list, xfs, linux-kernel
In-Reply-To: <alpine.DEB.2.02.1109130722210.21380@p34.internal.lan>
2011/9/13 Justin Piszcz <jpiszcz@lucidpixels.com>:
>
> I found this commit here:
> http://permalink.gmane.org/gmane.linux.kernel.pci/11700
>
> Applied:
> # patch -p1 < ../ed2888e906b56769b4ffabb9c577190438aa68b8.txt patching file
> drivers/pci/probe.c
>
>
Oh, I should have sent the git anchor you can use instead of searching the web ;
git pull https://github.com/torvalds/linux.git
^ permalink raw reply
* Re: 3.1-rc4: spectacular kernel errors / filesystem crash
From: Justin Piszcz @ 2011-09-13 14:54 UTC (permalink / raw)
To: Eric Dumazet
Cc: Jesse Brandeburg, Alan Piszcz, NetDEV list, xfs, linux-kernel
In-Reply-To: <1315886706.2556.11.camel@edumazet-laptop>
On Tue, 13 Sep 2011, Eric Dumazet wrote:
> Please Justin make sure you pulled commit
>
> commit ed2888e906b56769b4ffabb9c577190438aa68b8
> Author: Jon Mason <mason@myri.com>
> Date: Thu Sep 8 16:41:18 2011 -0500
>
> PCI: Remove MRRS modification from MPS setting code
>
> Modifying the Maximum Read Request Size to 0 (value of 128Bytes) has
> massive negative ramifications on some devices. Without knowing which
> devices have this issue, do not modify from the default value when
> walking the PCI-E bus in pcie_bus_safe mode. Also, make pcie_bus_safe
> the default procedure.
>
> Tested-by: Sven Schnelle <svens@stackframe.org>
> Tested-by: Simon Kirby <sim@hostway.ca>
> Tested-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
> Reported-and-tested-by: Eric Dumazet <eric.dumazet@gmail.com>
> Reported-and-tested-by: Niels Ole Salscheider <niels_ole@salscheider-online.
> References: https://bugzilla.kernel.org/show_bug.cgi?id=42162
> Signed-off-by: Jon Mason <mason@myri.com>
> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hello,
I found this commit here:
http://permalink.gmane.org/gmane.linux.kernel.pci/11700
Applied:
# patch -p1 < ../ed2888e906b56769b4ffabb9c577190438aa68b8.txt
patching file drivers/pci/probe.c
I will update this thread if the problem recurs, can someone also please advise
which DEBUG options I should have enabled to catch further SLAB/RCU issues?
So far, I have the following enabled:
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SLAB_LEAK=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_STACK_USAGE=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_VM=y
CONFIG_DEBUG_VIRTUAL=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_PER_CPU_MAPS=y
CONFIG_DEBUG_PAGEALLOC=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_DEBUG_RODATA=y
Thanks,
Justin.
^ permalink raw reply
* Re: user namespaces v3: continue targetting capabilities
From: Serge E. Hallyn @ 2011-09-13 14:43 UTC (permalink / raw)
To: akpm, segooon, linux-kernel, netdev, containers, dhowells,
ebiederm, rdunlap
In-Reply-To: <1314993400-6910-1-git-send-email-serge@hallyn.com>
I did a bit of basic performance testing - just running unixbench
and doing a kernel compile (without profiling) with and without
this patchset, with USER_NS enabled for both. I could find no
meaningful impact.
473.01user 32.48system 9:05.44elapsed 92%CPU (0avgtext+0avgdata 430752maxresident)k
112736inputs+576936outputs (8major+22057422minor)pagefaults 0swaps
473.78user 33.12system 9:06.14elapsed 92%CPU (0avgtext+0avgdata 430752maxresident)k
116656inputs+576936outputs (12major+22056621minor)pagefaults 0swaps
and with:
474.09user 31.62system 9:05.70elapsed 92%CPU (0avgtext+0avgdata 430752maxresident)k
112648inputs+576936outputs (7major+22056909minor)pagefaults 0swaps
472.54user 33.26system 9:05.43elapsed 92%CPU (0avgtext+0avgdata 430608maxresident)k
116656inputs+576936outputs (12major+22058358minor)pagefaults 0swaps
I'll append the full unixbench outputs below, but index score without
the patchset was 1594.3, and with the patchset was 1597.4.
thanks,
-serge
=====================================================================
unixbench without patchset:
=====================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: marula: GNU/Linux
OS: GNU/Linux -- 3.0.0-11-server -- #17-Ubuntu SMP Fri Sep 9 19:31:36 UTC 2011
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz (4800.3 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
02:43:44 up 3:00, 1 user, load average: 0.05, 0.03, 0.03; runlevel 2
------------------------------------------------------------------------
Benchmark Run: Mon Sep 12 2011 02:43:44 - 03:11:55
1 CPU in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 28147322.1 lps (10.0 s, 7 samples)
Double-Precision Whetstone 3289.7 MWIPS (10.0 s, 7 samples)
Execl Throughput 4557.5 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1145450.6 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 312941.7 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1969030.8 KBps (30.0 s, 2 samples)
Pipe Throughput 2080076.5 lps (10.0 s, 7 samples)
Pipe-based Context Switching 331910.6 lps (10.0 s, 7 samples)
Process Creation 14921.7 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 6989.7 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 913.9 lpm (60.0 s, 2 samples)
System Call Overhead 3453367.4 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 28147322.1 2411.9
Double-Precision Whetstone 55.0 3289.7 598.1
Execl Throughput 43.0 4557.5 1059.9
File Copy 1024 bufsize 2000 maxblocks 3960.0 1145450.6 2892.6
File Copy 256 bufsize 500 maxblocks 1655.0 312941.7 1890.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 1969030.8 3394.9
Pipe Throughput 12440.0 2080076.5 1672.1
Pipe-based Context Switching 4000.0 331910.6 829.8
Process Creation 126.0 14921.7 1184.3
Shell Scripts (1 concurrent) 42.4 6989.7 1648.5
Shell Scripts (8 concurrent) 6.0 913.9 1523.2
System Call Overhead 15000.0 3453367.4 2302.2
========
System Benchmarks Index Score 1594.3
=====================================================================
unixbench with patchset:
=====================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: marula: GNU/Linux
OS: GNU/Linux -- 3.0.0-11-server -- #17userns1 SMP Mon Sep 12 13:42:40 UTC 2011
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Xeon(R) CPU E5530 @ 2.40GHz (4799.6 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET, Intel virtualization
12:42:07 up 8 min, 1 user, load average: 0.00, 0.01, 0.02; runlevel 2
------------------------------------------------------------------------
Benchmark Run: Mon Sep 12 2011 12:42:07 - 13:10:19
1 CPU in system; running 1 parallel copy of tests
Dhrystone 2 using register variables 28232156.4 lps (10.0 s, 7 samples)
Double-Precision Whetstone 3290.0 MWIPS (10.0 s, 7 samples)
Execl Throughput 4553.7 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1142317.5 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 317068.8 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 1956611.4 KBps (30.0 s, 2 samples)
Pipe Throughput 2086728.8 lps (10.0 s, 7 samples)
Pipe-based Context Switching 343275.1 lps (10.0 s, 7 samples)
Process Creation 14718.6 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 6989.0 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 913.6 lpm (60.0 s, 2 samples)
System Call Overhead 3434956.0 lps (10.0 s, 7 samples)
System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 28232156.4 2419.2
Double-Precision Whetstone 55.0 3290.0 598.2
Execl Throughput 43.0 4553.7 1059.0
File Copy 1024 bufsize 2000 maxblocks 3960.0 1142317.5 2884.6
File Copy 256 bufsize 500 maxblocks 1655.0 317068.8 1915.8
File Copy 4096 bufsize 8000 maxblocks 5800.0 1956611.4 3373.5
Pipe Throughput 12440.0 2086728.8 1677.4
Pipe-based Context Switching 4000.0 343275.1 858.2
Process Creation 126.0 14718.6 1168.1
Shell Scripts (1 concurrent) 42.4 6989.0 1648.3
Shell Scripts (8 concurrent) 6.0 913.6 1522.6
System Call Overhead 15000.0 3434956.0 2290.0
========
System Benchmarks Index Score 1597.4
^ permalink raw reply
* Re: [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation
From: Jeff Layton @ 2011-09-13 13:52 UTC (permalink / raw)
To: Stanislav Kinsbursky
Cc: Trond Myklebust,
linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Pavel Emelianov, neilb-l3A5Bk7waGM@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
bfields-uC3wQj2KruNg9hUCZPvPmw@public.gmane.org,
davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org
In-Reply-To: <4E6F5D2F.4050100-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
On Tue, 13 Sep 2011 17:39:59 +0400
Stanislav Kinsbursky <skinsbursky-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> wrote:
> 13.09.2011 16:51, Jeff Layton пишет:
> > My assumption in reading this set (maybe wrong) was that this was a
> > preliminary set for now that just plops in function calls in the places
> > that do this sort of thing now. I figured that eventually he'd convert
> > rpcb_create_local, et. al. to do the same thing but within the correct
> > namespace for the calling task.
> >
>
> You have a right assumption. This is exactly what I'm going to do next.
>
> >
> > I think the simplest solution would be to basically call these
> > functions closer to where the rpcbind calls happen today, and just
> > don't do them when the svc_program has vs_hidden set or if the xprt is
> > being created with SVC_SOCK_ANONYMOUS set.
> >
>
> This solution is not the simplest one since we call svc_register() for every svc
> socket if it's not anonymous. But svc_unregister() is called only once for all
> inet families and protocols.
>
Ahh ok, good point.
> Also I've noticed, that we call svc_unregister in __svc_create(). I.e. we call
> it for nfs callbacks as well (in spite of that we don't need this). Thus, for
> now, nfs callbacks service creation depends on rpcbind clients presence.
>
Yeah, that's just to remove the any existing registration before we set
up the new one. In the case of a "hidden" service that can probably be
skipped if it makes things easier.
> So, for my pow, we need something like startup() callback, passed to
> svc_create(_pooled)() to clean up this mess.
> This callback will be defined only for lockd and nfsd and will create rpcbind
> clients and remove any stale portmap registrations.
>
That sounds like a reasonable scheme. I'll wait to see the patches.
--
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation
From: Stanislav Kinsbursky @ 2011-09-13 13:39 UTC (permalink / raw)
To: Jeff Layton
Cc: Trond Myklebust, linux-nfs@vger.kernel.org, Pavel Emelianov,
neilb@suse.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bfields@fieldses.org,
davem@davemloft.net
In-Reply-To: <20110913085139.00f112e2@corrin.poochiereds.net>
13.09.2011 16:51, Jeff Layton пишет:
> My assumption in reading this set (maybe wrong) was that this was a
> preliminary set for now that just plops in function calls in the places
> that do this sort of thing now. I figured that eventually he'd convert
> rpcb_create_local, et. al. to do the same thing but within the correct
> namespace for the calling task.
>
You have a right assumption. This is exactly what I'm going to do next.
>
> I think the simplest solution would be to basically call these
> functions closer to where the rpcbind calls happen today, and just
> don't do them when the svc_program has vs_hidden set or if the xprt is
> being created with SVC_SOCK_ANONYMOUS set.
>
This solution is not the simplest one since we call svc_register() for every svc
socket if it's not anonymous. But svc_unregister() is called only once for all
inet families and protocols.
Also I've noticed, that we call svc_unregister in __svc_create(). I.e. we call
it for nfs callbacks as well (in spite of that we don't need this). Thus, for
now, nfs callbacks service creation depends on rpcbind clients presence.
So, for my pow, we need something like startup() callback, passed to
svc_create(_pooled)() to clean up this mess.
This callback will be defined only for lockd and nfsd and will create rpcbind
clients and remove any stale portmap registrations.
--
Best regards,
Stanislav Kinsbursky
^ permalink raw reply
* Re: Temporary(?) relocation of wireless git trees...
From: John W. Linville @ 2011-09-13 13:29 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA, David Woodhouse,
David S. Miller, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20110913105858.eedd5ac594679aa36111c9d4-3FnU+UHB4dNDw9hX6IcOSA@public.gmane.org>
On Tue, Sep 13, 2011 at 10:58:58AM +1000, Stephen Rothwell wrote:
> Hi John,
>
> On Mon, 12 Sep 2011 14:13:52 -0400 "John W. Linville" <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> wrote:
> >
> > With no news on when the kernel.org trees will be accessible again
> > (which could be 10 minutes from now for all I know), I have pushed
> > my local copies to Infradead. This should be equivalent to what was
> > last pushed to kernel.org almost two weeks ago.
> >
> > The "current" wireless tree is here:
> >
> > git://git.infradead.org/users/linville/wireless.git
> >
> > The "next" wireless tree is here:
> >
> > git://git.infradead.org/users/linville/wireless-next.git
>
> OK, I have switched to these using their "master" branches. There is
> nothing new in them, correct?
Yes, correct. Hopefully more new stuff today...
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: pskb_copy() in tcp_transmit_skb()
From: Eric Dumazet @ 2011-09-13 12:51 UTC (permalink / raw)
To: christoph.paasch; +Cc: Gaofeng, netdev
In-Reply-To: <201109131541.08542.christoph.paasch@uclouvain.be>
Le 13 septembre 2011 14:41, Christoph Paasch
<christoph.paasch@uclouvain.be> a écrit :
> Eric,
>
> On Tuesday 13 September 2011 wrote Eric Dumazet:
>> I suggest you read dev_queue_xmit_nit() : Every xmit packet can be
>> cloned right here.
>>
>> By the time tcp_retransmit_skb() is called, cloned skb might still be
>> in a AF_PACKET queue (or even a device TX queue)
>
> Thanks for the clear answer.
>
> So, basically every call to tcp_retransmit_skb on an skb that is also still
> hold in an AF_PACKET queue will end up in pskb_copy, because:
> 1. it has been cloned previously in tcp_transmit_skb()
> 2. The data_ref > 1 because it's clone is still in an AF_PACKET queue.
>
> Please correct me, if I'm wrong.
Thats correct.
^ permalink raw reply
* Re: [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation
From: Jeff Layton @ 2011-09-13 12:51 UTC (permalink / raw)
To: Trond Myklebust
Cc: Stanislav Kinsbursky, linux-nfs@vger.kernel.org, Pavel Emelianov,
neilb@suse.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bfields@fieldses.org,
davem@davemloft.net
In-Reply-To: <1315596308.17611.46.camel@lade.trondhjem.org>
On Fri, 09 Sep 2011 15:25:08 -0400
Trond Myklebust <Trond.Myklebust@netapp.com> wrote:
> On Fri, 2011-09-09 at 15:01 -0400, Jeff Layton wrote:
> > On Fri, 09 Sep 2011 14:44:34 -0400
> > Trond Myklebust <Trond.Myklebust@netapp.com> wrote:
> >
> > > On Fri, 2011-09-09 at 20:41 +0400, Stanislav Kinsbursky wrote:
> > > > 09.09.2011 18:07, Jeff Layton пишет:
> > > > > On Fri, 09 Sep 2011 16:08:44 +0400
> > > > > Stanislav Kinsbursky<skinsbursky@parallels.com> wrote:
> > > > >
> > > > >> Create rcbind clients or increase rpcbind users counter during RPC service
> > > > >> creation and decrease this counter (and possibly destroy those clients) on RPC
> > > > >> service destruction.
> > > > >>
> > > > >> Signed-off-by: Stanislav Kinsbursky<skinsbursky@parallels.com>
> > > > >>
> > > > >> ---
> > > > >> include/linux/sunrpc/clnt.h | 2 ++
> > > > >> net/sunrpc/rpcb_clnt.c | 2 +-
> > > > >> net/sunrpc/svc.c | 13 +++++++++++--
> > > > >> 3 files changed, 14 insertions(+), 3 deletions(-)
> > > > >>
> > > > >> diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
> > > > >> index db7bcaf..65a8115 100644
> > > > >> --- a/include/linux/sunrpc/clnt.h
> > > > >> +++ b/include/linux/sunrpc/clnt.h
> > > > >> @@ -135,10 +135,12 @@ void rpc_shutdown_client(struct rpc_clnt *);
> > > > >> void rpc_release_client(struct rpc_clnt *);
> > > > >> void rpc_task_release_client(struct rpc_task *);
> > > > >>
> > > > >> +int rpcb_create_local(void);
> > > > >> int rpcb_register(u32, u32, int, unsigned short);
> > > > >> int rpcb_v4_register(const u32 program, const u32 version,
> > > > >> const struct sockaddr *address,
> > > > >> const char *netid);
> > > > >> +void rpcb_put_local(void);
> > > > >> void rpcb_getport_async(struct rpc_task *);
> > > > >>
> > > > >> void rpc_call_start(struct rpc_task *);
> > > > >> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
> > > > >> index b4cc0f1..437ec60 100644
> > > > >> --- a/net/sunrpc/rpcb_clnt.c
> > > > >> +++ b/net/sunrpc/rpcb_clnt.c
> > > > >> @@ -318,7 +318,7 @@ out:
> > > > >> * Returns zero on success, otherwise a negative errno value
> > > > >> * is returned.
> > > > >> */
> > > > >> -static int rpcb_create_local(void)
> > > > >> +int rpcb_create_local(void)
> > > > >> {
> > > > >> static DEFINE_MUTEX(rpcb_create_local_mutex);
> > > > >> int result = 0;
> > > > >> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
> > > > >> index 6a69a11..9095c0e 100644
> > > > >> --- a/net/sunrpc/svc.c
> > > > >> +++ b/net/sunrpc/svc.c
> > > > >> @@ -367,8 +367,11 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
> > > > >> unsigned int xdrsize;
> > > > >> unsigned int i;
> > > > >>
> > > > >> - if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
> > > > >> + if (rpcb_create_local()< 0)
> > > > >> return NULL;
> > > > >> +
> > > > >> + if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
> > > > >> + goto out_err;
> > > > >> serv->sv_name = prog->pg_name;
> > > > >> serv->sv_program = prog;
> > > > >> serv->sv_nrthreads = 1;
> > > > >> @@ -403,7 +406,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
> > > > >> GFP_KERNEL);
> > > > >> if (!serv->sv_pools) {
> > > > >> kfree(serv);
> > > > >> - return NULL;
> > > > >> + goto out_err;
> > > > >> }
> > > > >>
> > > > >> for (i = 0; i< serv->sv_nrpools; i++) {
> > > > >> @@ -423,6 +426,10 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
> > > > >> svc_unregister(serv);
> > > > >>
> > > > >> return serv;
> > > > >> +
> > > > >> +out_err:
> > > > >> + rpcb_put_local();
> > > > >> + return NULL;
> > > > >> }
> > > > >>
> > > > >> struct svc_serv *
> > > > >> @@ -491,6 +498,8 @@ svc_destroy(struct svc_serv *serv)
> > > > >> svc_unregister(serv);
> > > > >> kfree(serv->sv_pools);
> > > > >> kfree(serv);
> > > > >> +
> > > > >> + rpcb_put_local();
> > > > >> }
> > > > >> EXPORT_SYMBOL_GPL(svc_destroy);
> > > > >>
> > > > >>
> > > > >
> > > > > I don't get it -- what's the advantage of creating rpcbind clients in
> > > > > __svc_create vs. the old way of creating them just before we plan to
> > > > > use them?
> > > > >
> > > >
> > > > The main problem here is not in creation, but in destroying those clients.
> > > > Now rpcbind clients are created during rpcb_register(). I.e. once per every family, program version and so on.
> > > > But can be unregistered for all protocol families by one call. So it's impossible to put reference counting for those clients in the place, where they are created now.
> > >
> > > Could we perhaps set up a 'struct pernet_operations' to create a
> > > destructor for them?
> > >
> >
> > An even easier idea might be to just not take a reference to the
> > rpcbind client for svc_programs that have vs_hidden set on every
> > version.
>
> Isn't the problem that Stanislav is trying to solve that we need to be
> able to register and unregister RPC services to the correct rpcbind
> server, depending on which net namespace we are in?
>
> My understanding is that the current code will register everything to
> whatever rpcbind server is running in the init net namespace because
> that's what rpcb_create_local() uses.
>
My assumption in reading this set (maybe wrong) was that this was a
preliminary set for now that just plops in function calls in the places
that do this sort of thing now. I figured that eventually he'd convert
rpcb_create_local, et. al. to do the same thing but within the correct
namespace for the calling task.
> My suggestion is to use a struct pernet_operations to detect when a net
> namespace is being created or destroyed, so that the rpcbind client code
> knows when to create or destroy a connection to the server that is
> running in that namespace.
>
I'm not sure that solves anything. I'd also ass|u|me that something
here (the xprt?) will hold a reference to its netns. If we try to do
this with pernet ops, then I think we'd end up with a chicken-and-egg
problem...
I think the simplest solution would be to basically call these
functions closer to where the rpcbind calls happen today, and just
don't do them when the svc_program has vs_hidden set or if the xprt is
being created with SVC_SOCK_ANONYMOUS set.
In fact, a rethink of the vs_hidden/SVC_SOCK_ANONYMOUS scheme would
probably be a good preliminary patch here. There's a lot of overlap
between those two flags, and somehow consolidating them would probably
be a good thing.
--
Jeff Layton <jlayton@redhat.com>
^ permalink raw reply
* Re: pskb_copy() in tcp_transmit_skb()
From: Christoph Paasch @ 2011-09-13 12:41 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Gaofeng, netdev
In-Reply-To: <CAL4Wiio=2MO2u53dvU1fqjeKqgQuVBmgDpZeVROMaZYcPPDpzA@mail.gmail.com>
Eric,
On Tuesday 13 September 2011 wrote Eric Dumazet:
> I suggest you read dev_queue_xmit_nit() : Every xmit packet can be
> cloned right here.
>
> By the time tcp_retransmit_skb() is called, cloned skb might still be
> in a AF_PACKET queue (or even a device TX queue)
Thanks for the clear answer.
So, basically every call to tcp_retransmit_skb on an skb that is also still
hold in an AF_PACKET queue will end up in pskb_copy, because:
1. it has been cloned previously in tcp_transmit_skb()
2. The data_ref > 1 because it's clone is still in an AF_PACKET queue.
Please correct me, if I'm wrong.
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* Re: pskb_copy() in tcp_transmit_skb()
From: Gao feng @ 2011-09-13 12:00 UTC (permalink / raw)
To: christoph.paasch; +Cc: netdev
In-Reply-To: <201109131355.55588.christoph.paasch@uclouvain.be>
于 11-9-13 下午6:55, Christoph Paasch 写道:
> Hi,
>
> On Tuesday 13 September 2011 wrote Gaofeng:
>>> I'm trying to understand the reason for the possible call to pskb_copy()
>>> in tcp_transmit_skb().
>>> I don't find, where we may have a cloned skb entering tcp_transmit_skb().
>>>
>>> The original pskb_copy() came from tcp_retransmit_skb() (commit
>>> dfb4b9dceb35c567a595ae5e9d035cfda044a103).
>>> But from that point, the git-history does not show where the pskb_copy()
>>> is coming from.
>>>
>>>
>>> Does somebody has an idea, how a cloned skb can be passed to
>>> tcp_transmit_skb() and thus trigger this call to pskb_copy().
>>
>> maybe nat,nat can change the tcp packet header
>
> although NAT may change the TCP header, it is not doing an skb_clone() - (at
> least I don't find it).
> Thus, we will not call pskb_copy() in tcp_transmit_skb() due to NAT.
>
> Christoph
>
> --
> Christoph Paasch
> PhD Student
>
> IP Networking Lab --- http://inl.info.ucl.ac.be
> MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
> Université Catholique de Louvain
>
> www.rollerbulls.be
> --
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
maybe this.
if the nic driver has not transmit the cloned skb to the network yet.
then tcp_retransmit_skb is called by some logical.
if dont use pskb_copy here,it will make the nat or some header operation
error.
^ permalink raw reply
* Re: pskb_copy() in tcp_transmit_skb()
From: Eric Dumazet @ 2011-09-13 12:02 UTC (permalink / raw)
To: christoph.paasch; +Cc: Gaofeng, netdev
In-Reply-To: <201109131355.55588.christoph.paasch@uclouvain.be>
Le 13 septembre 2011 12:55, Christoph Paasch
<christoph.paasch@uclouvain.be> a écrit :
>
> Hi,
>
> On Tuesday 13 September 2011 wrote Gaofeng:
> > > I'm trying to understand the reason for the possible call to pskb_copy()
> > > in tcp_transmit_skb().
> > > I don't find, where we may have a cloned skb entering tcp_transmit_skb().
> > >
> > > The original pskb_copy() came from tcp_retransmit_skb() (commit
> > > dfb4b9dceb35c567a595ae5e9d035cfda044a103).
> > > But from that point, the git-history does not show where the pskb_copy()
> > > is coming from.
> > >
> > >
> > > Does somebody has an idea, how a cloned skb can be passed to
> > > tcp_transmit_skb() and thus trigger this call to pskb_copy().
> >
> > maybe nat,nat can change the tcp packet header
>
> although NAT may change the TCP header, it is not doing an skb_clone() - (at
> least I don't find it).
> Thus, we will not call pskb_copy() in tcp_transmit_skb() due to NAT.
>
I suggest you read dev_queue_xmit_nit() : Every xmit packet can be
cloned right here.
By the time tcp_retransmit_skb() is called, cloned skb might still be
in a AF_PACKET queue (or even a device TX queue)
^ permalink raw reply
* Re: [PATCH v2 3/5] SUNRPC: make RPC service dependable on rpcbind clients creation
From: Stanislav Kinsbursky @ 2011-09-13 11:09 UTC (permalink / raw)
To: Trond Myklebust
Cc: Jeff Layton, linux-nfs@vger.kernel.org, Pavel Emelianov,
neilb@suse.de, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, bfields@fieldses.org,
davem@davemloft.net
In-Reply-To: <4E6DEB89.7080407@parallels.com>
12.09.2011 15:22, Stanislav Kinsbursky пишет:
> 09.09.2011 23:25, Trond Myklebust пишет:
>> On Fri, 2011-09-09 at 15:01 -0400, Jeff Layton wrote:
>>> On Fri, 09 Sep 2011 14:44:34 -0400
>>> Trond Myklebust<Trond.Myklebust@netapp.com> wrote:
>>>
>>>> On Fri, 2011-09-09 at 20:41 +0400, Stanislav Kinsbursky wrote:
>>>>> 09.09.2011 18:07, Jeff Layton пишет:
>>>>>> On Fri, 09 Sep 2011 16:08:44 +0400
>>>>>> Stanislav Kinsbursky<skinsbursky@parallels.com> wrote:
>>>>>>
>>>>>>> Create rcbind clients or increase rpcbind users counter during RPC service
>>>>>>> creation and decrease this counter (and possibly destroy those clients) on RPC
>>>>>>> service destruction.
>>>>>>>
>>>>>>> Signed-off-by: Stanislav Kinsbursky<skinsbursky@parallels.com>
>>>>>>>
>>>>>>> ---
>>>>>>> include/linux/sunrpc/clnt.h | 2 ++
>>>>>>> net/sunrpc/rpcb_clnt.c | 2 +-
>>>>>>> net/sunrpc/svc.c | 13 +++++++++++--
>>>>>>> 3 files changed, 14 insertions(+), 3 deletions(-)
>>>>>>>
>>>>>>> diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
>>>>>>> index db7bcaf..65a8115 100644
>>>>>>> --- a/include/linux/sunrpc/clnt.h
>>>>>>> +++ b/include/linux/sunrpc/clnt.h
>>>>>>> @@ -135,10 +135,12 @@ void rpc_shutdown_client(struct rpc_clnt *);
>>>>>>> void rpc_release_client(struct rpc_clnt *);
>>>>>>> void rpc_task_release_client(struct rpc_task *);
>>>>>>>
>>>>>>> +int rpcb_create_local(void);
>>>>>>> int rpcb_register(u32, u32, int, unsigned short);
>>>>>>> int rpcb_v4_register(const u32 program, const u32 version,
>>>>>>> const struct sockaddr *address,
>>>>>>> const char *netid);
>>>>>>> +void rpcb_put_local(void);
>>>>>>> void rpcb_getport_async(struct rpc_task *);
>>>>>>>
>>>>>>> void rpc_call_start(struct rpc_task *);
>>>>>>> diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
>>>>>>> index b4cc0f1..437ec60 100644
>>>>>>> --- a/net/sunrpc/rpcb_clnt.c
>>>>>>> +++ b/net/sunrpc/rpcb_clnt.c
>>>>>>> @@ -318,7 +318,7 @@ out:
>>>>>>> * Returns zero on success, otherwise a negative errno value
>>>>>>> * is returned.
>>>>>>> */
>>>>>>> -static int rpcb_create_local(void)
>>>>>>> +int rpcb_create_local(void)
>>>>>>> {
>>>>>>> static DEFINE_MUTEX(rpcb_create_local_mutex);
>>>>>>> int result = 0;
>>>>>>> diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
>>>>>>> index 6a69a11..9095c0e 100644
>>>>>>> --- a/net/sunrpc/svc.c
>>>>>>> +++ b/net/sunrpc/svc.c
>>>>>>> @@ -367,8 +367,11 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
>>>>>>> unsigned int xdrsize;
>>>>>>> unsigned int i;
>>>>>>>
>>>>>>> - if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
>>>>>>> + if (rpcb_create_local()< 0)
>>>>>>> return NULL;
>>>>>>> +
>>>>>>> + if (!(serv = kzalloc(sizeof(*serv), GFP_KERNEL)))
>>>>>>> + goto out_err;
>>>>>>> serv->sv_name = prog->pg_name;
>>>>>>> serv->sv_program = prog;
>>>>>>> serv->sv_nrthreads = 1;
>>>>>>> @@ -403,7 +406,7 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
>>>>>>> GFP_KERNEL);
>>>>>>> if (!serv->sv_pools) {
>>>>>>> kfree(serv);
>>>>>>> - return NULL;
>>>>>>> + goto out_err;
>>>>>>> }
>>>>>>>
>>>>>>> for (i = 0; i< serv->sv_nrpools; i++) {
>>>>>>> @@ -423,6 +426,10 @@ __svc_create(struct svc_program *prog, unsigned int bufsize, int npools,
>>>>>>> svc_unregister(serv);
>>>>>>>
>>>>>>> return serv;
>>>>>>> +
>>>>>>> +out_err:
>>>>>>> + rpcb_put_local();
>>>>>>> + return NULL;
>>>>>>> }
>>>>>>>
>>>>>>> struct svc_serv *
>>>>>>> @@ -491,6 +498,8 @@ svc_destroy(struct svc_serv *serv)
>>>>>>> svc_unregister(serv);
>>>>>>> kfree(serv->sv_pools);
>>>>>>> kfree(serv);
>>>>>>> +
>>>>>>> + rpcb_put_local();
>>>>>>> }
>>>>>>> EXPORT_SYMBOL_GPL(svc_destroy);
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> I don't get it -- what's the advantage of creating rpcbind clients in
>>>>>> __svc_create vs. the old way of creating them just before we plan to
>>>>>> use them?
>>>>>>
>>>>>
>>>>> The main problem here is not in creation, but in destroying those clients.
>>>>> Now rpcbind clients are created during rpcb_register(). I.e. once per every family, program version and so on.
>>>>> But can be unregistered for all protocol families by one call. So it's impossible to put reference counting for those clients in the place, where they are created now.
>>>>
>>>> Could we perhaps set up a 'struct pernet_operations' to create a
>>>> destructor for them?
>>>>
>>>
>>> An even easier idea might be to just not take a reference to the
>>> rpcbind client for svc_programs that have vs_hidden set on every
>>> version.
>>
>> Isn't the problem that Stanislav is trying to solve that we need to be
>> able to register and unregister RPC services to the correct rpcbind
>> server, depending on which net namespace we are in?
>>
>
> Yes, it is.
> I'm going to make rpcbind clients per net namespace.
>
>> My understanding is that the current code will register everything to
>> whatever rpcbind server is running in the init net namespace because
>> that's what rpcb_create_local() uses.
>>
>> My suggestion is to use a struct pernet_operations to detect when a net
>> namespace is being created or destroyed, so that the rpcbind client code
>> knows when to create or destroy a connection to the server that is
>> running in that namespace.
>>
>
> But as Pavel mentioned already, we can't use netns destructor for rpcbind
> clients because they holds netns reference.
> That's why we have to untie netns from rpbind clients first.
> Another solution is to not increment netns ref counter for rpcbind sockets as,
> again, Pavel already mentioned.
> But first approach looks clearer from my pow. That's why I'm trying to make
> rcpbind client's self-destructible.After achieving this we can just make this
> rpcbind clients per netns and then we can virtualize lockd.
>
> I've tried to find some better place for creating rpcbind clients (instead of
> __svc_create()). But this place looks like the best one for current solution.
>
> About avoiding of creation of rpcbind clients for nfs 4.* callbacks.
> Probably, we can implement init-fini calls for svc_program structure
> (rpcb_create_local() and rpcb_put_local() will be used in our case) and then
> inherit them for svc_serv. This will allow us to call this hooks only if they
> defined and thus avoid rpcbind clients creation for nfs callbacks.
>
> What all of you think about this hook's idea?
>
Since we already have sv_shutdown callback, we can use it to put rpcbind clients.
Creation of rpcbind clients can be performed in lockd_up() and
nfsd_create_serv() before calling svc_create(_pooled)().
>> Cheers
>> Trond
>
>
--
Best regards,
Stanislav Kinsbursky
^ permalink raw reply
* HELLO FROM BELDORIN..
From: Beldorin Duke @ 2011-09-13 10:00 UTC (permalink / raw)
Hello,it is my pleasure and desire to contact you and make a formal
introduction of myself to you.how are you doing today,i hope that you are
fine and my little note finds you in good health and proper state of
mind.my name is Beldorin Duke i am 24years old single and i have no kid,i
am in search of true love,friendship and a real trustworthy business
partner that i think we can be of benefit to each other,upon the reciept
of your email i will explain myself more clearly and better to you,feel
free to contact me at (beldorinminu@yahoo.com) for further discussion with
me.
I wish you a pleasant and favourable day there as i hope to read from you
soon,i will send you my details togather with pictures of me in my next
email to you,be assured of my warm regards and best of wishes.
Beldorin Duke
^ permalink raw reply
* Re: pskb_copy() in tcp_transmit_skb()
From: Christoph Paasch @ 2011-09-13 10:55 UTC (permalink / raw)
To: Gaofeng; +Cc: netdev
In-Reply-To: <4E6F2275.2050902@cn.fujitsu.com>
Hi,
On Tuesday 13 September 2011 wrote Gaofeng:
> > I'm trying to understand the reason for the possible call to pskb_copy()
> > in tcp_transmit_skb().
> > I don't find, where we may have a cloned skb entering tcp_transmit_skb().
> >
> > The original pskb_copy() came from tcp_retransmit_skb() (commit
> > dfb4b9dceb35c567a595ae5e9d035cfda044a103).
> > But from that point, the git-history does not show where the pskb_copy()
> > is coming from.
> >
> >
> > Does somebody has an idea, how a cloned skb can be passed to
> > tcp_transmit_skb() and thus trigger this call to pskb_copy().
>
> maybe nat,nat can change the tcp packet header
although NAT may change the TCP header, it is not doing an skb_clone() - (at
least I don't find it).
Thus, we will not call pskb_copy() in tcp_transmit_skb() due to NAT.
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* Re: [PATCH] ixgbe: drop zero length frame segments during a packet split rx
From: Neil Horman @ 2011-09-13 10:50 UTC (permalink / raw)
To: netdev
Cc: Thadeu Lima de Souza Cascardo, Jesse Brandeburg, Alexander Duyck,
John Fastabend, Jeff Kirsher, David S. Miller
In-Reply-To: <1314972197-31557-1-git-send-email-nhorman@tuxdriver.com>
On Fri, Sep 02, 2011 at 10:03:17AM -0400, Neil Horman wrote:
> This oops was reported recently no ppc64 hardware:
> Unable to handle kernel paging request for data at address 0x00000000
> Faulting instruction address: 0xc0000000004dda0c
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=1024 NUMA pSeries
> Modules linked in: sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4
> iptable_fi
> lter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state
> nf_conntrack ip6table_filter ip6_tables ipv6 jsm ses enclosure sg ixgbe
> mdio e1000 ehea ext4 jbd2 mbcache sd_mod crc_t10dif ipr dm_mod
> NIP: c0000000004dda0c LR: c0000000004e3e50 CTR: c0000000004e3e20
> REGS: c0000001bffeb8d0 TRAP: 0300 Not tainted (3.1.0-rc2-10121-gab7e2db)
> MSR: 8000000000009032 <EE,ME,IR,DR> CR: 28002042 XER: 20000000
> CFAR: c000000000004d70
> DAR: 0000000000000000, DSISR: 40000000
> TASK = c000000000d548e0[0] 'swapper' THREAD: c000000000dfc000 CPU: 0
> GPR04: c0000000010f4d80 c0000001bffebd80 0000000000000000 c0000001b18a8200
> GPR08: 0000000000000280 c0000001bcc517a8 c0000001b18a7f80 0000000000000000
> GPR12: d0000000047e5bb0 c000000001f10000 c0000001b19c8700 0000000000000000
> GPR16: c0000001bffebd80 0000000000000083 c00000018f2447a0 0000000000000002
> GPR20: 0000000000000000 c0000001ba860010 c0000001ba860000 d000000003d40000
> GPR24: 0000000000000000 0000000000000083 d000000003d40000 0000000000000001
> GPR28: c00000018f244780 c0000001b2b94310 c000000000da95f0 c0000001bcc51780
> NIP [c0000000004dda0c] .skb_gro_reset_offset+0x5c/0xe0
> LR [c0000000004e3e50] .napi_gro_receive+0x30/0x120
> Call Trace:
> [c0000001bffebb50] [c000000000da95f0] perf_callchain_user+0x0/0x10 (unreliable)
> [c0000001bffebbf0] [d0000000047bd118] .ixgbe_clean_rx_irq+0x7a8/0x8a0 [ixgbe]
> [c0000001bffebd10] [d0000000047bd414] .ixgbe_poll+0x64/0x160 [ixgbe]
> [c0000001bffebdd0] [c0000000004e3358] .net_rx_action+0x108/0x2a0
> [c0000001bffebea0] [c00000000009b220] .__do_softirq+0x110/0x2a0
> [c0000001bffebf90] [c000000000023798] .call_do_softirq+0x14/0x24
> [c000000000dff830] [c000000000011148] .do_softirq+0xf8/0x130
> [c000000000dff8d0] [c00000000009aeb4] .irq_exit+0xb4/0xc0
> [c000000000dff950] [c000000000011254] .do_IRQ+0xd4/0x300
> [c000000000dffa10] [c000000000005024] hardware_interrupt_entry+0x18/0x74
> --- Exception: 501 at .pseries_dedicated_idle_sleep+0xe4/0x210
> LR = .pseries_dedicated_idle_sleep+0x8c/0x210
> [c000000000dffd00] [c00000000005b194] .pseries_dedicated_idle_sleep+0x194/0x210
> (unreliable)
> [c000000000dffdc0] [c000000000018c84] .cpu_idle+0x164/0x210
> [c000000000dffe70] [c00000000000b0d0] .rest_init+0x90/0xb0
> [c000000000dffef0] [c000000000830bc0] .start_kernel+0x54c/0x56c
> [c000000000dfff90] [c00000000000953c] .start_here_common+0x1c/0x60
>
> Its caused when skb_gro_reset_offset attempts to call PageHighMem on
> skb_shinfo(skb)->frags[0].page, when the frags array was left uninitalized.
> This can happen in the ixgbe driver if the hardware reports a zero length rx
> descriptor ni the middle of a packet split receive transaction. I've consulted
> with Jesse Brandeburg on this, who is attempting to root cause the issue at
> Intel, but it seems prudent to add this check to the driver to discard frames of
> that encounter this error to avoid the opps
>
Sorry, I need to rescind this patch. Looks like this is turning out to be an
issue with an ideosyncracy in the dma hardware on this platform.
Thanks
Neil
^ permalink raw reply
* [PATCH] net/smsc911x: Correctly configure 16-bit register access from DT
From: Dave Martin @ 2011-09-13 10:49 UTC (permalink / raw)
To: netdev
Cc: patches, Steve Glendinning, Shawn Guo, devicetree-discuss,
Dave Martin
The SMSC911X_USE_16BIT needs to be set when using 16-bit register
access. However, currently no flag is set if the device tree
doesn't specify 32-bit access, resulting in a BUG() and a non-
working driver when 16-bit register access is configured for
smsc911x in the DT.
This patch should set the SMSC911X_USE_16BIT flag in a manner
consistent with the documented DT bindings.
Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
drivers/net/ethernet/smsc/smsc911x.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 788c4fd..a3aa4c0 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -2121,6 +2121,8 @@ static int __devinit smsc911x_probe_config_dt(
of_property_read_u32(np, "reg-io-width", &width);
if (width == 4)
config->flags |= SMSC911X_USE_32BIT;
+ else
+ config->flags |= SMSC911X_USE_16BIT;
if (of_get_property(np, "smsc,irq-active-high", NULL))
config->irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH;
--
1.7.4.1
^ permalink raw reply related
* Re: pskb_copy() in tcp_transmit_skb()
From: Gaofeng @ 2011-09-13 9:29 UTC (permalink / raw)
To: christoph.paasch; +Cc: netdev
In-Reply-To: <201109131221.37561.christoph.paasch@uclouvain.be>
于 2011年09月13日 17:21, Christoph Paasch 写道:
> Hi,
>
> I'm trying to understand the reason for the possible call to pskb_copy() in
> tcp_transmit_skb().
> I don't find, where we may have a cloned skb entering tcp_transmit_skb().
>
> The original pskb_copy() came from tcp_retransmit_skb() (commit
> dfb4b9dceb35c567a595ae5e9d035cfda044a103).
> But from that point, the git-history does not show where the pskb_copy() is
> coming from.
>
>
> Does somebody has an idea, how a cloned skb can be passed to
> tcp_transmit_skb() and thus trigger this call to pskb_copy().
>
>
> Thanks for your help,
> Christoph
>
>
> --
> Christoph Paasch
> PhD Student
>
> IP Networking Lab --- http://inl.info.ucl.ac.be
> MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
> Université Catholique de Louvain
>
> www.rollerbulls.be
> --
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
maybe nat,nat can change the tcp packet header
^ permalink raw reply
* pskb_copy() in tcp_transmit_skb()
From: Christoph Paasch @ 2011-09-13 9:21 UTC (permalink / raw)
To: netdev
Hi,
I'm trying to understand the reason for the possible call to pskb_copy() in
tcp_transmit_skb().
I don't find, where we may have a cloned skb entering tcp_transmit_skb().
The original pskb_copy() came from tcp_retransmit_skb() (commit
dfb4b9dceb35c567a595ae5e9d035cfda044a103).
But from that point, the git-history does not show where the pskb_copy() is
coming from.
Does somebody has an idea, how a cloned skb can be passed to
tcp_transmit_skb() and thus trigger this call to pskb_copy().
Thanks for your help,
Christoph
--
Christoph Paasch
PhD Student
IP Networking Lab --- http://inl.info.ucl.ac.be
MultiPath TCP in the Linux Kernel --- http://inl.info.ucl.ac.be/mptcp
Université Catholique de Louvain
www.rollerbulls.be
--
^ permalink raw reply
* End of Year Promo
From: Pepsi Bottling Company Plc @ 2011-09-13 9:06 UTC (permalink / raw)
Your email has won £520,000.00 POUNDS (Five Hundred and Twenty
Thousand Pounds) from Pepsi online promotions2011,send your Full
names, Age, Sex,Occupation,Phone number and Home Address to the promo
Manager, Mrs. Francess Dave Tel:+447011150911
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
^ permalink raw reply
* Re: [PATCH -v2] netconsole: switch init_netconsole() to late_initcall if build-in
From: Lin Ming @ 2011-09-13 8:38 UTC (permalink / raw)
To: Andrew Morton
Cc: David S. Miller, lkml, netdev@vger.kernel.org, Kirsher, Jeffrey T
In-Reply-To: <20110913010158.1652cdee.akpm@linux-foundation.org>
On Tue, 2011-09-13 at 16:01 +0800, Andrew Morton wrote:
> On Tue, 13 Sep 2011 15:45:39 +0800 Lin Ming <ming.m.lin@intel.com> wrote:
>
> > Commit 88491d8(drivers/net: Kconfig & Makefile cleanup) causes a
> > regression that netconsole does not work if netconsole and network
> > device driver are build into kernel, because netconsole is linked
> > before network device driver.
> >
> > Andrew Morton suggested to fix this with initcall ordering.
> > Fixes it by switching init_netconsole() to late_initcall if build-in.
> >
> > Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> > ---
> > drivers/net/netconsole.c | 4 ++++
> > 1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> > index dfc8272..914be29 100644
> > --- a/drivers/net/netconsole.c
> > +++ b/drivers/net/netconsole.c
> > @@ -799,5 +799,9 @@ static void __exit cleanup_netconsole(void)
> > }
> > }
> >
> > +#ifdef MODULE
> > module_init(init_netconsole);
> > module_exit(cleanup_netconsole);
> > +#else
> > +late_initcall(init_netconsole);
> > +#endif /* !MODULE */
>
> The ifdefs (which should have used CONFIG_MODULE) aren't needed.
> Because late_initcall() and module_init() are identical if
> CONFIG_MODULE, and because one day we might want to run the exitcalls
> for built-in code (UML actually does this at present).
Thanks for comments.
Updated as below.
>From 035af5dca36a3b9e255758a46214e0e6d2b5b6a3 Mon Sep 17 00:00:00 2001
From: Lin Ming <ming.m.lin@intel.com>
Date: Tue, 13 Sep 2011 16:35:46 +0800
Subject: [PATCH -v3] netconsole: switch init_netconsole() to late_initcall
Commit 88491d8(drivers/net: Kconfig & Makefile cleanup) causes a
regression that netconsole does not work if netconsole and network
device driver are build into kernel, because netconsole is linked
before network device driver.
Andrew Morton suggested to fix this with initcall ordering.
Fixes it by switching init_netconsole() to late_initcall.
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
---
drivers/net/netconsole.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index dfc8272..ed2a397 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -799,5 +799,11 @@ static void __exit cleanup_netconsole(void)
}
}
-module_init(init_netconsole);
+/*
+ * Use late_initcall to ensure netconsole is
+ * initialized after network device driver if built-in.
+ *
+ * late_initcall() and module_init() are identical if built as module.
+ */
+late_initcall(init_netconsole);
module_exit(cleanup_netconsole);
--
1.7.2.5
^ permalink raw reply related
* Re: [PATCH -v2] netconsole: switch init_netconsole() to late_initcall if build-in
From: Lin Ming @ 2011-09-13 8:26 UTC (permalink / raw)
To: Américo Wang
Cc: David S. Miller, Andrew Morton, lkml, netdev@vger.kernel.org,
Kirsher, Jeffrey T
In-Reply-To: <CAM_iQpVsKXn3ZMygOKc699KQPXbt=-yEWMdKFLqYGVucoJ874w@mail.gmail.com>
On Tue, 2011-09-13 at 15:55 +0800, Américo Wang wrote:
> On Tue, Sep 13, 2011 at 3:45 PM, Lin Ming <ming.m.lin@intel.com> wrote:
> > Commit 88491d8(drivers/net: Kconfig & Makefile cleanup) causes a
> > regression that netconsole does not work if netconsole and network
> > device driver are build into kernel, because netconsole is linked
> > before network device driver.
> >
> > Andrew Morton suggested to fix this with initcall ordering.
> > Fixes it by switching init_netconsole() to late_initcall if build-in.
> >
>
> Putting one or two lines of comments into the code would
> be nicer, otherwise people have to dig git log to see why. ;-)
Will add.
Thanks.
^ permalink raw reply
* Re: r8169 hard-freezes the system on big network loads
From: Francois Romieu @ 2011-09-13 8:11 UTC (permalink / raw)
To: Michael Brade; +Cc: netdev, nic_swsd, Hayes
In-Reply-To: <201109112216.33579.brade@informatik.uni-muenchen.de>
[-- Attachment #1: Type: text/plain, Size: 3204 bytes --]
Michael Brade <brade@informatik.uni-muenchen.de> :
[...]
> Does it have to be 3.1.0-rc3 or is 3.0.1 ok as well ?
:o(
Almost any release may exhibit the bug. The attached patch (#0003)
should be a better candidate as an official fix though.
> If so, I have another bad news: 3.0.1 still crashes with this patch.
> It took me a lot longer to crash it but eventually it did happen.
> Not sure why it took longer, I guess I didn't generate enough throughput.
It sure sucks from a user experience viewpoint but it is not _that_ bad.
Are the symptoms in any way different or do you still notice more-or-less
periodic link-up messages and no real network traffic ?
> If you want me to use 3.1.0 then we'll have to wait until git.kernel.org is
> back...
https://github.com/torvalds/linux.git is available in the meantime.
You will want the patch below as well if you try 3.1-rc6.
[PATCH] r8169: don't reset software ring indexes after disabling hardware Rx.
Bad things happen when the driver resets ring indexes after disabling
hardware Rx (and Tx) in the RxFIFOOver event recovery path of the irq
handler while it races with the NAPI Rx processing method.
Ring indexes init is now done before enabling hardware Rx / Tx.
NB: this is not a straight candidate for -stable since it is coupled
with commit 92fc43b4159b518f5baae57301f26d770b0834c9 (July 11).
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
---
drivers/net/r8169.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 05566b1..22b9c7a 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -717,7 +717,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
struct net_device *dev);
static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance);
static int rtl8169_init_ring(struct net_device *dev);
-static void rtl_hw_start(struct net_device *dev);
+static void rtl_start(struct net_device *dev);
static int rtl8169_close(struct net_device *dev);
static void rtl_set_rx_mode(struct net_device *dev);
static void rtl8169_tx_timeout(struct net_device *dev);
@@ -3589,8 +3589,6 @@ static void rtl_hw_reset(struct rtl8169_private *tp)
break;
udelay(100);
}
-
- rtl8169_init_ring_indexes(tp);
}
static int __devinit
@@ -3948,7 +3946,7 @@ static int rtl8169_open(struct net_device *dev)
rtl_pll_power_up(tp);
- rtl_hw_start(dev);
+ rtl_start(dev);
tp->saved_wolopts = 0;
pm_runtime_put_noidle(&pdev->dev);
@@ -4014,10 +4012,14 @@ static void rtl_set_rx_tx_config_registers(struct rtl8169_private *tp)
(InterFrameGap << TxInterFrameGapShift));
}
-static void rtl_hw_start(struct net_device *dev)
+static void rtl_start(struct net_device *dev)
{
struct rtl8169_private *tp = netdev_priv(dev);
+ rtl8169_init_ring_indexes(tp);
+
+ smp_mb();
+
tp->hw_start(dev);
netif_start_queue(dev);
@@ -4997,7 +4999,7 @@ static void rtl8169_reset_task(struct work_struct *work)
rtl8169_tx_clear(tp);
rtl8169_hw_reset(tp);
- rtl_hw_start(dev);
+ rtl_start(dev);
netif_wake_queue(dev);
rtl8169_check_link_status(dev, tp, tp->mmio_addr);
--
1.7.6
[-- Attachment #2: 0003-r8169-remove-erroneous-processing-of-always-set-bit.patch --]
[-- Type: text/plain, Size: 1589 bytes --]
>From 44071c614418d9cae2faab8307307578d104065b Mon Sep 17 00:00:00 2001
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 25 Aug 2011 18:47:24 +0200
Subject: [PATCH 3/3] r8169: remove erroneous processing of always set bit.
When set, RxFOVF (resp. RxBOVF) is always 1 (resp. 0).
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
---
drivers/net/r8169.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 22b9c7a..19b91a8 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -407,6 +407,7 @@ enum rtl_register_content {
RxOK = 0x0001,
/* RxStatusDesc */
+ RxBOVF = (1 << 24),
RxFOVF = (1 << 23),
RxRWT = (1 << 22),
RxRES = (1 << 21),
@@ -682,6 +683,7 @@ struct rtl8169_private {
struct mii_if_info mii;
struct rtl8169_counters counters;
u32 saved_wolopts;
+ u32 opts1_mask;
struct rtl_fw {
const struct firmware *fw;
@@ -3782,6 +3784,9 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
tp->intr_event = cfg->intr_event;
tp->napi_event = cfg->napi_event;
+ tp->opts1_mask = (tp->mac_version != RTL_GIGA_MAC_VER_01) ?
+ ~(RxBOVF | RxFOVF) : ~0;
+
init_timer(&tp->timer);
tp->timer.data = (unsigned long) dev;
tp->timer.function = rtl8169_phy_timer;
@@ -5323,7 +5328,7 @@ static int rtl8169_rx_interrupt(struct net_device *dev,
u32 status;
rmb();
- status = le32_to_cpu(desc->opts1);
+ status = le32_to_cpu(desc->opts1) & tp->opts1_mask;
if (status & DescOwn)
break;
--
1.7.6
^ permalink raw reply related
* Re: [PATCH -v2] netconsole: switch init_netconsole() to late_initcall if build-in
From: Andrew Morton @ 2011-09-13 8:01 UTC (permalink / raw)
To: Lin Ming; +Cc: David S. Miller, lkml, netdev, Jeff Kirsher
In-Reply-To: <1315899939.3402.2.camel@snb>
On Tue, 13 Sep 2011 15:45:39 +0800 Lin Ming <ming.m.lin@intel.com> wrote:
> Commit 88491d8(drivers/net: Kconfig & Makefile cleanup) causes a
> regression that netconsole does not work if netconsole and network
> device driver are build into kernel, because netconsole is linked
> before network device driver.
>
> Andrew Morton suggested to fix this with initcall ordering.
> Fixes it by switching init_netconsole() to late_initcall if build-in.
>
> Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> ---
> drivers/net/netconsole.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
> index dfc8272..914be29 100644
> --- a/drivers/net/netconsole.c
> +++ b/drivers/net/netconsole.c
> @@ -799,5 +799,9 @@ static void __exit cleanup_netconsole(void)
> }
> }
>
> +#ifdef MODULE
> module_init(init_netconsole);
> module_exit(cleanup_netconsole);
> +#else
> +late_initcall(init_netconsole);
> +#endif /* !MODULE */
The ifdefs (which should have used CONFIG_MODULE) aren't needed.
Because late_initcall() and module_init() are identical if
CONFIG_MODULE, and because one day we might want to run the exitcalls
for built-in code (UML actually does this at present).
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox