Received: from eggs.gnu.org ([2001:4830:134:3::10]:43662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cefRf-0006wo-Od for qemu-devel@nongnu.org; Fri, 17 Feb 2017 05:07:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cefRe-0006LP-Uv for qemu-devel@nongnu.org; Fri, 17 Feb 2017 05:07:19 -0500 From: Alberto Garcia In-Reply-To: <1487318764-29513-1-git-send-email-pagupta@redhat.com> References: <1487318764-29513-1-git-send-email-pagupta@redhat.com> Date: Fri, 17 Feb 2017 11:06:31 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] block, migration: Use qemu_madvise inplace of madvise List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pankaj Gupta , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: kwolf@redhat.com, quintela@redhat.com, dgilbert@redhat.com, mreitz@redhat.com On Fri 17 Feb 2017 09:06:04 AM CET, Pankaj Gupta wrote: > To maintain consistency at all the places use qemu_madvise wrapper > inplace of madvise call. > if (length > 0) { > - madvise((uint8_t *) t + offset, length, MADV_DONTNEED); > + qemu_madvise((uint8_t *) t + offset, length, QEMU_MADV_DONTNEED); This was changed two months ago from qemu_madvise() to madvise(), is there any reason why you want to revert that change? Those two calls are not equivalent, please see commit 2f2c8d6b371cfc6689affb0b7e for an explanation. > - if (madvise(start, length, MADV_DONTNEED)) { > + if (qemu_madvise(start, length, QEMU_MADV_DONTNEED)) { > error_report("%s MADV_DONTNEED: %s", __func__, strerror(errno)); And this is the same case. Berto