From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBv0-0007nH-Ep for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:31:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDBus-0005kl-W8 for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:31:14 -0400 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]:34806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDBus-0005in-PG for qemu-devel@nongnu.org; Thu, 09 Jul 2015 09:31:06 -0400 Received: by pdbep18 with SMTP id ep18so165311904pdb.1 for ; Thu, 09 Jul 2015 06:31:04 -0700 (PDT) Message-ID: <559E7799.1030300@gmail.com> Date: Thu, 09 Jul 2015 21:31:05 +0800 From: Wen Congyang MIME-Version: 1.0 References: <1436274549-28826-1-git-send-email-quintela@redhat.com> <1436274549-28826-28-git-send-email-quintela@redhat.com> <20150708191318.GM4117@noname.redhat.com> <559D89AD.4090000@redhat.com> <559DCC2A.1040400@cn.fujitsu.com> <559E29E5.5000402@redhat.com> <559E2D57.4020204@cn.fujitsu.com> <559E6E6C.5010507@redhat.com> In-Reply-To: <559E6E6C.5010507@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 27/28] migration: protect migration_bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Wen Congyang , Kevin Wolf , Juan Quintela Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, Li Zhijian At 2015/7/9 20:51, Paolo Bonzini Wrote: > > > On 09/07/2015 10:14, Wen Congyang wrote: >>> flush_compressed_data(f); >>> ram_control_after_iterate(f, RAM_CONTROL_FINISH); >>> - migration_end(); >>> - >>> rcu_read_unlock(); >>> + >>> + migration_end(); >>> qemu_put_be64(f, RAM_SAVE_FLAG_EOS); >> >> Yes, this patch can work. But if the caller hold the rcu read lock in >> the future, we may need to fix it again. I think it is better to use >> call_rcu(). > > Why? Just document that migration_end must be called outside an RCU > read-side critical section. It's not a heavy limitation. > If so, it is OK Thanks Wen Congyang > Paolo > >