Re: [PATCH net-next v2 3/3] udp: use it's own memory accounting schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-09-27 at 18:58 +0200, Paolo Abeni wrote:


> 
> Since the new memory accounting model does not require socket
> locking, remove the lock on enqueue and free and avoid using the
> backlog on enqueue.


...

>  	__UDP_INC_STATS(sock_net(sk), UDP_MIB_CSUMERRORS, is_udplite);
> @@ -2345,6 +2325,7 @@ struct proto udp_prot = {
>  	.connect	   = ip4_datagram_connect,
>  	.disconnect	   = udp_disconnect,
>  	.ioctl		   = udp_ioctl,
> +	.init		   = udp_init_sock,
>  	.destroy	   = udp_destroy_sock,
>  	.setsockopt	   = udp_setsockopt,
>  	.getsockopt	   = udp_getsockopt,
> @@ -2357,7 +2338,10 @@ struct proto udp_prot = {
>  	.unhash		   = udp_lib_unhash,
>  	.rehash		   = udp_v4_rehash,
>  	.get_port	   = udp_v4_get_port,
> +	.enter_memory_pressure = udp_enter_memory_pressure,
> +	.sockets_allocated = &udp_sockets_allocated,
>  	.memory_allocated  = &udp_memory_allocated,
> +	.memory_pressure   = &udp_memory_pressure,
>  	.sysctl_mem	   = sysctl_udp_mem,
>  	.sysctl_wmem	   = &sysctl_udp_wmem_min,
>  	.sysctl_rmem	   = &sysctl_udp_rmem_min,


I find disturbing you did not remove 

	.backlog_rcv       = __udp_queue_rcv_skb,


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux