RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-19 Thread Liang, Kan
> > Yes, rtnl will bring some overheads. But the configuration is one time > > thing for application or socket. It only happens on receiving first > > packet. > > Thanks for destroying our connection rates. > > This kind of overhead is simply unacceptable. If so, I think I can make the configu

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread David Miller
From: "Liang, Kan" Date: Tue, 19 Jul 2016 01:49:41 + > Yes, rtnl will bring some overheads. But the configuration is one > time thing for application or socket. It only happens on receiving > first packet. Thanks for destroying our connection rates. This kind of overhead is simply unaccepta

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> > > Also of course it would be fundamentally less efficient than kernel > > code doing that, just because of the additional context switches > > needed. > > Synchronizing or configuring any kind of queues already requires rtnl_mutex. > I didn't test it but acquiring rtnl mutex in inet_recvmsg

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Hannes Frederic Sowa
Hello, On Mon, Jul 18, 2016, at 21:43, Andi Kleen wrote: > > I wonder if this can be attacked from a different angle. What would be > > missing to add support for this in user space? The first possibility > > that came to my mind is to just multiplex those hints in the kernel. > > "just" is the h

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Daniel Borkmann
On 07/18/2016 08:30 PM, Liang, Kan wrote: On 07/18/2016 08:55 AM, kan.li...@intel.com wrote: [...] On a higher level picture, why for example, a new cgroup in combination with tc shouldn't be the ones resolving these policies on resource usage? The NET policy doesn't support cgroup yet, but i

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> >> > >> On Mon, Jul 18, 2016 at 8:45 AM, Andi Kleen wrote: > >> >> It seems strange to me to add such policies to the kernel. > >> >> Addmittingly, documentation of some settings is non-existent and > >> >> one needs various different tools to set this (sysctl, procfs, sysfs, > ethtool, etc).

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Cong Wang
On Mon, Jul 18, 2016 at 1:14 PM, Liang, Kan wrote: > > >> >> On Mon, Jul 18, 2016 at 8:45 AM, Andi Kleen wrote: >> >> It seems strange to me to add such policies to the kernel. >> >> Addmittingly, documentation of some settings is non-existent and one >> >> needs various different tools to set th

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> > On Mon, Jul 18, 2016 at 8:45 AM, Andi Kleen wrote: > >> It seems strange to me to add such policies to the kernel. > >> Addmittingly, documentation of some settings is non-existent and one > >> needs various different tools to set this (sysctl, procfs, sysfs, ethtool, > >> etc). > > > > Th

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Andi Kleen
> > So where is your policy for power saving? From past experience I can tell > > you > > There is no policy for power saving yet. I will add it to my todo list. Yes it's interesting to consider. The main goal here is to maximize CPU idle residency? I wonder if that's that much different from t

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> On Sun, Jul 17, 2016 at 11:55 PM, wrote: > > From: Kan Liang > > > > It is a big challenge to get good network performance. First, the > > network performance is not good with default system settings. Second, > > it is too difficult to do automatic tuning for all possible workloads, > > sinc

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Andi Kleen
> I wonder if this can be attacked from a different angle. What would be > missing to add support for this in user space? The first possibility > that came to my mind is to just multiplex those hints in the kernel. "just" is the handwaving part here -- you're proposing a micro kernel approach wher

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Hannes Frederic Sowa
On 18.07.2016 17:45, Andi Kleen wrote: >> It seems strange to me to add such policies to the kernel. >> Addmittingly, documentation of some settings is non-existent and one needs >> various different tools to set this (sysctl, procfs, sysfs, ethtool, etc). > > The problem is that different applica

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> > Hi Kan, > > On 07/18/2016 08:55 AM, kan.li...@intel.com wrote: > > From: Kan Liang > > > > It is a big challenge to get good network performance. First, the > > network performance is not good with default system settings. Second, > > it is too difficult to do automatic tuning for all poss

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> On Mon, Jul 18, 2016 at 5:51 PM, Liang, Kan wrote: > > > > > >> > > >> > It is a big challenge to get good network performance. First, the > >> > network performance is not good with default system settings. > >> > Second, it is too difficult to do automatic tuning for all possible > >> > work

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Cong Wang
On Mon, Jul 18, 2016 at 8:45 AM, Andi Kleen wrote: >> It seems strange to me to add such policies to the kernel. >> Addmittingly, documentation of some settings is non-existent and one needs >> various different tools to set this (sysctl, procfs, sysfs, ethtool, etc). > > The problem is that diffe

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> > > > It seems strange to me to add such policies to the kernel. > > > > But kernel is the only place which can merge all user's requests. > > I don't think so. > > If different requests conflict in a way that is possible to dosomething > meaningful the I don't see why userspace tool cannot

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Alexander Duyck
On Sun, Jul 17, 2016 at 11:55 PM, wrote: > From: Kan Liang > > It is a big challenge to get good network performance. First, the network > performance is not good with default system settings. Second, it is too > difficult to do automatic tuning for all possible workloads, since workloads > have

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Tom Herbert
On Mon, Jul 18, 2016 at 5:51 PM, Liang, Kan wrote: > > >> > >> > It is a big challenge to get good network performance. First, the >> > network performance is not good with default system settings. Second, >> > it is too difficult to do automatic tuning for all possible workloads, >> > since workl

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Daniel Borkmann
Hi Kan, On 07/18/2016 08:55 AM, kan.li...@intel.com wrote: From: Kan Liang It is a big challenge to get good network performance. First, the network performance is not good with default system settings. Second, it is too difficult to do automatic tuning for all possible workloads, since worklo

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Florian Westphal
Liang, Kan wrote: > > What is missing in the kernel UAPI so userspace could do these settings on > > its > > own, without adding this policy stuff to the kernel? > > The main purpose of the proposal is to simplify the configuration. Too many > options will let them confuse. > For normal users,

RE: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Liang, Kan
> > > > It is a big challenge to get good network performance. First, the > > network performance is not good with default system settings. Second, > > it is too difficult to do automatic tuning for all possible workloads, > > since workloads have different requirements. Some workloads may want >

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Andi Kleen
> It seems strange to me to add such policies to the kernel. > Addmittingly, documentation of some settings is non-existent and one needs > various different tools to set this (sysctl, procfs, sysfs, ethtool, etc). The problem is that different applications need different policies. The only entit

Re: [RFC PATCH 00/30] Kernel NET policy

2016-07-18 Thread Florian Westphal
kan.li...@intel.com wrote: > From: Kan Liang > > It is a big challenge to get good network performance. First, the network > performance is not good with default system settings. Second, it is too > difficult to do automatic tuning for all possible workloads, since workloads > have different req