public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Alex,Shi" <alex.shi@intel.com>
Cc: Christoph Lameter <cl@gentwo.org>,
	"tj@kernel.org" <tj@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Huang, Ying" <ying.huang@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"avi@redhat.com" <avi@redhat.com>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	"kaber@trash.net" <kaber@trash.net>,
	"a.p.zijlstra@chello.nl" <a.p.zijlstra@chello.nl>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"jeremy@xensource.com" <jeremy@xensource.com>
Subject: Re: [PATCH] Code clean up for percpu_xxx() functions
Date: Thu, 20 Oct 2011 07:08:01 +0200	[thread overview]
Message-ID: <1319087281.8416.45.camel@edumazet-laptop> (raw)
In-Reply-To: <1319078687.23426.146.camel@debian>

Le jeudi 20 octobre 2011 à 10:44 +0800, Alex,Shi a écrit :
> > Acked-by: Christoph Lameter <cl@gentwo.org>
> 
> Thanks, Christoph! 
> and resend for code style problem correction. 
> 

Sorry this huge patch brings too many potential bugs.

I ask you a separate patch for the networking part, because I dont want
to Ack all the other parts.

> diff --git a/net/socket.c b/net/socket.c
> index ffe92ca..2845d38 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -479,7 +479,7 @@ static struct socket *sock_alloc(void)
>  	inode->i_uid = current_fsuid();
>  	inode->i_gid = current_fsgid();
>  
> -	percpu_add(sockets_in_use, 1);
> +	__this_cpu_add(sockets_in_use, 1);

No, we are in process context, you need

	this_cpu_add(sockets_in_use, 1);

>  	return sock;
>  }
>  
> @@ -522,7 +522,7 @@ void sock_release(struct socket *sock)
>  	if (rcu_dereference_protected(sock->wq, 1)->fasync_list)
>  		printk(KERN_ERR "sock_release: fasync list not empty!\n");
>  
> -	percpu_sub(sockets_in_use, 1);
> +	__this_cpu_sub(sockets_in_use, 1);

	this_cpu_sub();

>  	if (!sock->file) {
>  		iput(SOCK_INODE(sock));
>  		return;




  reply	other threads:[~2011-10-20  5:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1318237851.27949.190.camel@debian>
     [not found] ` <alpine.DEB.2.00.1110101026080.16264@router.home>
     [not found]   ` <1318324774.27949.693.camel@debian>
     [not found]     ` <alpine.DEB.2.00.1110110910480.3388@router.home>
     [not found]       ` <1318382964.27949.782.camel@debian>
     [not found]         ` <1318428673.29699.13.camel@debian>
     [not found]           ` <alpine.DEB.2.00.1110120910540.26610@router.home>
     [not found]             ` <1318908091.23426.52.camel@debian>
     [not found]               ` <alpine.DEB.2.00.1110180932330.687@router.home>
2011-10-19  9:23                 ` [PATCH] Code clean up for percpu_xxx() functions Alex,Shi
2011-10-19  9:26                   ` Avi Kivity
2011-10-20  2:45                     ` Alex,Shi
2011-10-20  7:34                     ` [PATCH 2/3] kvm: use this_cpu_xxx replace percpu_xxx funcs Alex,Shi
2011-10-24  2:50                       ` Alex,Shi
2011-10-24 11:05                         ` Avi Kivity
2011-11-21  9:02                           ` Alex,Shi
2011-11-21  9:20                             ` Avi Kivity
2011-11-21  9:52                               ` Alex,Shi
2012-01-11  8:48                               ` Alex,Shi
2011-10-19 15:34                   ` [PATCH] Code clean up for percpu_xxx() functions Christoph Lameter
2011-10-20  2:44                     ` Alex,Shi
2011-10-20  5:08                       ` Eric Dumazet [this message]
2011-10-20  6:04                         ` Alex,Shi
2011-10-20  6:13                           ` Alex,Shi
2011-10-20  6:04                         ` Alex,Shi
2011-10-20  7:20                         ` [PATCH 0/3] code clean and optimzed for percpu_xxx serials funcs Alex,Shi
2011-10-20  7:32                         ` [PATCH 1/3] net: use this_cpu_xxx replace percpu_xxx funcs Alex,Shi
2011-10-20  8:38                           ` Eric Dumazet
2011-11-21  9:00                             ` Alex,Shi
2011-12-02  2:33                               ` Alex,Shi
2011-12-02 11:56                                 ` Patrick McHardy
2012-01-11  8:45                                   ` Alex,Shi
2012-01-11  9:03                                     ` David Miller
2012-01-11  9:10                                       ` Alex,Shi
2011-10-20  7:35                     ` [PATCH 3/3] Code clean up for percpu_xxx() functions Alex,Shi
2011-11-21  9:10                       ` Alex,Shi
2011-11-22  0:06                         ` tj
2012-01-11  9:08                           ` Alex,Shi
2012-01-11 17:19                             ` tj
2012-01-12  0:44                               ` H. Peter Anvin
2012-01-12  2:05                                 ` Alex,Shi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319087281.8416.45.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=avi@redhat.com \
    --cc=cl@gentwo.org \
    --cc=davem@davemloft.net \
    --cc=jeremy@xensource.com \
    --cc=kaber@trash.net \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=ying.huang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox