From: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> Do not make the cache line dirty when nothing has changed. sock_update_classid() does exactly the same thing. Signed-off-by: Daniel Wagner <daniel.wagner@xxxxxxxxxxxx> Acked-by: Neil Horman <nhorman@xxxxxxxxxxxxx> Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Cc: Glauber Costa <glommer@xxxxxxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Li Zefan <lizefan@xxxxxxxxxx> Cc: Eric Dumazet <edumazet@xxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> --- net/core/sock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/core/sock.c b/net/core/sock.c index 929bdcc..bbab10d 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -1182,10 +1182,14 @@ EXPORT_SYMBOL(sock_update_classid); void sock_update_netprioidx(struct sock *sk) { + u32 prioidx; + if (in_interrupt()) return; - sk->sk_cgrp_prioidx = task_netprioidx(current); + prioidx = task_netprioidx(current); + if (prioidx != sk->sk_cgrp_prioidx) + sk->sk_cgrp_prioidx = prioidx; } EXPORT_SYMBOL_GPL(sock_update_netprioidx); #endif -- 1.7.11.1.165.g299666c -- To unsubscribe from this list: send the line "unsubscribe cgroups" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html