David Miller wrote:
This patch would not apply, because is contained changes
present in the first patch, specifically:
snip
And now I see exactly what you did, and it is quite careless.
You wrote one big patch then tried to split it up by hand. This
proves to me that you did not test the
[EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
udp.c | 32
1 file changed, 28 insertions(+), 4 deletions(-)
diff -pruN net-2.6.25-t12t19m-p6/net/ipv6/udp.c
net-2.6.25-t12t19m-p7/net/ipv6/udp.c
--- net-2.6.25-t12t19m-p6/net/ipv6/udp.c2007
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Thu, 20 Dec 2007 23:18:54 -0500
Also, the memory accounting is done at different parts in
the socket code paths for stream vs. datagram. This is why
everything is inconsistent, and, a mess.
Could you tell me more detailed
Hello,
David Miller wrote:
diff -pruN net-2.6/net/ipv4/ip_output.c
net-2.6-udp-take11a1-p1/net/ipv4/ip_output.c
--- net-2.6/net/ipv4/ip_output.c 2007-12-11 10:54:55.0 -0500
+++ net-2.6-udp-take11a1-p1/net/ipv4/ip_output.c 2007-12-17
14:42:31.0 -0500
@@ -1004,6
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Mon, 17 Dec 2007 21:38:47 -0500
This patch adds UDP memory usage accounting in IPv4.
We can't accept these changes, even once the other issues
are fixed, until IPV6 is supported as well.
It's pointless to support proper UDP
Hello,
Thank you so much for your comments.
David Miller wrote:
All of these other functions are identical copies of the stream
counterparts, they should all be consolidated.
I still see a lot of special casing, instead of large pieces of common
code.
There should be one core set of
Hello,
I really apologize for not replying to this mail sooner.
Herbert Xu wrote:
On Mon, Dec 03, 2007 at 07:10:45PM -0500, Hideo AOKI wrote:
Because we have to call wmem_schedule function in ip_append_data()
which is used by several protocols both stream and datagram.
I just thought adding
PROTECTED]
signed-off-by: Masami Hiramatsu [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
include/net/sock.h | 78 +++
net/core/datagram.c | 85
2 files changed, 163 insertions
(): avoided using divide instruction
* udp_recvmsg(): fixed referring released truesize in accounting
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo
This patch introduces sndbuf size check before memory allocation for
send buffer.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff -pruN net-2.6/net/ipv4/ip_output.c
net-2.6-udp
() is a receive buffer detractor for datagram
protocols which are capable of protocol specific memory accounting.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Takahiro Yasui [EMAIL PROTECTED]
signed-off-by: Masami Hiramatsu [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED
PROTECTED]
signed-off-by: Takahiro Yasui [EMAIL PROTECTED]
signed-off-by: Masami Hiramatsu [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c | 46 +--
udp.c | 78 +---
2 files
of pages for socket buffer is
beyond udp_mem and the socket already consumes minimum buffer.
This patch is also introduced memory_allocated variable for UDP protocol.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
Documentation/networking/ip-sysctl.txt | 18
Hello,
Thank you for your quick comments.
Herbert Xu wrote:
+spin_lock_irqsave(sk-sk_lock.slock, flags);
Please use bh_lock_sock since this must never be used from an
IRQ handler.
I'll try to re-implement this locking mechanism as David suggested.
+static inline void
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Sat, 15 Dec 2007 00:07:44 -0500
Changelog take 9 - take 10:
* supported using sk_forward_alloc
* introduced several memory accounting functions with spin lock
* changed detagram receive functions to be able to customize
:
* introduced mem_schdeule functions for datargram protocols
* removed protocol check function, from patch set
* restructured patch set
Changelog take 7 - take 8:
* sk_datagram_pages(): avoided using divide instruction
* udp_recvmsg(): fixed referring released truesize in accounting
Best regards,
Hideo
This patch introduces sndbuf size check before memory allocation for
send buffer.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff -pruN net-2.6/net/ipv4/ip_output.c
net-2.6-udp
PROTECTED]
signed-off-by: Masami Hiramatsu [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
include/net/sock.h | 117 +---
net/core/datagram.c | 72
net/core/sock.c | 13 -
3 files changed
of pages for socket buffer is
beyond udp_mem and the socket already consumes minimum buffer.
This patch is also introduced memory_allocated variable for UDP protocol.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
Documentation/networking/ip-sysctl.txt | 18
-off-by: Masami Hiramatsu [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
af_inet.c |2 ++
ip_output.c | 46 --
udp.c | 16 +++-
3 files changed, 61 insertions(+), 3 deletions(-)
diff -pruN net-2.6-udp
Herbert Xu wrote:
On Wed, Dec 05, 2007 at 11:28:34PM -0500, Hideo AOKI wrote:
1. Using sk_forward_alloc and adding socket lock
UDP already uses a socket lock to send message. However, it doesn't
use the lock to receive message. I wonder if we can also use the
lock when
Herbert Xu wrote:
On Mon, Dec 03, 2007 at 07:14:26PM -0500, Hideo AOKI wrote:
Let me try to use sk_forward_alloc at first, while percpu storage
is an interesting idea.
Actually I don't think sk_forward_alloc would work for UDP because
it runs lockless (unlike TCP which is run under
Herbert Xu wrote:
On Wed, Nov 28, 2007 at 01:52:59PM -0500, Hideo AOKI wrote:
+static inline int sk_wmem_schedule(struct sock *sk, int size)
+{
+if (sk-sk_type == SOCK_STREAM)
+return sk_stream_wmem_schedule(sk, size);
+else if (sk-sk_type == SOCK_DGRAM
Eric Dumazet wrote:
Herbert Xu a écrit :
However, I'm still a little concerned about the effect of two more
atomic op's per packet that we're adding here. Hang on a sec, that
should've been Dave's line since atomic ops are cheap on x86 :)
But seriously, it's not so much that we have two
This patch introduces datagram memory accounting functions. Owing to
call memory schedule functions from IP layer, sk_wmem_schedule() is
also added.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
include/net/sock.h | 31
This patch introduces sndbuf size check before memory allocation for
send buffer.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff -pruN net-2.6/net/ipv4/ip_output.c
net-2.6-udp
protocol other than UDP
* introducing __ip_check_max_skb_pages()
* using CTL_UNNUMBERED
* adding udp_mem usage to Documentation/networking/ip_sysctl.txt
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
-
To unsubscribe from this list: send the line unsubscribe netdev
of pages for socket buffer is
beyond udp_mem and the socket already consumes minimum buffer.
This patch is also introduced memory_allocated variable for UDP protocol.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
Documentation/networking/ip-sysctl.txt | 18
This patch adds UDP memory usage accounting in IPv4.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
af_inet.c | 30 +-
ip_output.c | 49 ++---
udp.c | 16
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Thu, 15 Nov 2007 16:50:14 -0500
+static inline int __ip_check_max_skb_pages(struct sock *sk, int size)
+{
+switch(sk-sk_protocol) {
+case IPPROTO_UDP:
+if (atomic_read(sk-sk_prot-memory_allocated) + size
Herbert Xu wrote:
On Thu, Nov 15, 2007 at 03:23:53PM -0800, David Miller wrote:
We don't have tests all over the place to see if a socket is TCP or
DCCP or SCTP in order to implement memory accounting there, because we
did it for connection oriented protocols cleanly, seperating things
via
Herbert Xu wrote:
On Wed, Nov 14, 2007 at 06:30:51PM -0500, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((unsigned int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+/* Cast to unsigned as an optimization, since amt is always
positive. */
+return
of /proc/sys/net/ipv4/udp_mem
* bugfix of UDP limit affecting protocol other than UDP
* introducing __ip_check_max_skb_pages()
* using CTL_UNNUMBERED
* adding udp_mem usage to Documentation/networking/ip_sysctl.txt
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc
This patch introduces memory limitation for UDP.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
Documentation/networking/ip-sysctl.txt |6
include/net/udp.h |3 ++
net/ipv4/af_inet.c |3
This patch introduces global variable for UDP memory accounting.
The unit is page.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
include/net/sock.h |8
include/net/udp.h |2 ++
net/ipv4/proc.c|3 ++-
net/ipv4/udp.c
This patch adds UDP memory usage accounting in IPv4.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
af_inet.c | 30 +-
ip_output.c | 25 ++---
udp.c | 10 ++
3 files changed
This patch introduces sndbuf size check before memory allocation for
send buffer.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff -pruN net-2.6/net/ipv4/ip_output.c net-2.6-udp-p1/net
This patch added /proc/sys/net/ipv4/udp_rmem_min and
/proc/sys/net/ipv4/udp_rmem_min. Each UDP packet is drooped when the
number of pages for socket buffer is beyond the limit and the socket
already consumes minimum buffer.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Tue, 13 Nov 2007 22:27:13 -0500
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+ return
Hideo AOKI wrote:
David Miller wrote:
From: Hideo AOKI [EMAIL PROTECTED]
Date: Tue, 13 Nov 2007 22:27:13 -0500
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt
affecting protocol other than UDP
* introducing __ip_check_max_skb_pages()
* using CTL_UNNUMBERED
* adding udp_mem usage to Documentation/networking/ip_sysctl.txt
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
-
To unsubscribe from this list: send the line unsubscribe netdev
This patch introduces sndbuf size check before memory allocation for
send buffer.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff -pruN net-2.6/net/ipv4/ip_output.c net-2.6-udp-p1
This patch introduces global variable for UDP memory accounting.
The unit is page.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
include/net/sock.h |7 +++
include/net/udp.h |2 ++
net/ipv4/proc.c|3 ++-
net/ipv4/udp.c
This patch adds UDP memory usage accounting in IPv4.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
af_inet.c | 30 +-
ip_output.c | 25 ++---
udp.c |9 +
3 files changed
This patch introduces memory limitation for UDP.
signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL PROTECTED]
---
Documentation/networking/ip-sysctl.txt |6
include/net/udp.h |3 ++
net/ipv4/af_inet.c |3
This patch added /proc/sys/net/ipv4/udp_rmem_min and
/proc/sys/net/ipv4/udp_rmem_min. Each UDP packet is drooped when the
number of pages for socket buffer is beyond the limit and the socket
already consumes minimum buffer.
Cc: Satoshi Oshima [EMAIL PROTECTED]
signed-off-by: Hideo Aoki [EMAIL
Hello,
I'm sorry that my response is always late.
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:22:53PM -0400, Hideo AOKI wrote:
This patch introduces sndbuf size check before memory allocation for
send buffer.
Looks good, what about IPv6?
I'm going to develop IPv6 part if IPv4 patch set
Hello,
Herbert Xu wrote:
On Mon, Oct 29, 2007 at 05:23:10PM -0400, Hideo AOKI wrote:
+#define SK_DATAGRAM_MEM_QUANTUM ((int)PAGE_SIZE)
+
+static inline int sk_datagram_pages(int amt)
+{
+ return DIV_ROUND_UP(amt, SK_DATAGRAM_MEM_QUANTUM);
+}
Does this really have to be int? Unsigned
Hello,
I'm sorry to not respond quickly.
Bill Fink wrote:
On Mon, 29 Oct 2007, Hideo AOKI wrote:
This patch added /proc/sys/net/udp_rmem and /proc/sys/net/udp_rmem.
Each UDP packet is drooped when the number of pages for socket buffer
is beyond the limit and the socket already consumes
* adding udp_mem usage to Documentation/networking/ip_sysctl.txt
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
-
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org
This patch introduces sndbuf size check before memory allocation for
send buffer.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
Signed-off-by: Hideo Aoki [EMAIL PROTECTED]
ip_output.c |5 +
1 file changed, 5 insertions(+)
diff
This patch introduces global variable for UDP memory accounting.
The unit is page.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
Signed-off-by: Hideo Aoki [EMAIL PROTECTED]
include/net/sock.h |7 +++
include/net/udp.h |2
This patch introduces memory limitation for UDP.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
Signed-off-by: Hideo Aoki [EMAIL PROTECTED]
Documentation/networking/ip-sysctl.txt |6
include/net/udp.h |3
This patch added /proc/sys/net/udp_rmem and /proc/sys/net/udp_rmem.
Each UDP packet is drooped when the number of pages for socket buffer
is beyond the limit and the socket already consumes minimum buffer.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Cc: Satoshi Oshima [EMAIL
This patch adds UDP memory usage accounting in IPv4.
--
Hideo Aoki
Hitachi Computer Products (America) Inc.
Signed-off-by: Satoshi Oshima [EMAIL PROTECTED]
Signed-off-by: Hideo Aoki [EMAIL PROTECTED]
af_inet.c | 30 +-
ip_output.c | 25
Herbert Xu wrote:
On Fri, Oct 12, 2007 at 09:11:27PM +0900, Satoshi OSHIMA wrote:
+static inline int __ip_check_max_skb_pages(struct sock *sk, int size)
+{
+ switch(sk-sk_protocol) {
+ case IPPROTO_UDP:
+ if (sk-sk_prot-sysctl_mem[0] UDP_MIN_SKB_PAGES)
+
accounting
if you need that, but not hacks in generic ip code.
As far as I know, Satoshi is improving this part right now. Please wait his
response.
Many thanks for your comments.
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
-
To unsubscribe from this list: send the line
followed implementation of
tcp_memory_allocated. However, I should agree that the patch introduces
atomic operations too much. Then, I'll try to use the batching to reduce
the number of atomic operations.
Best regards,
Hideo Aoki
--
Hitachi Computer Products (America) Inc.
-
To unsubscribe from
58 matches
Mail list logo