qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Garzarella <sgarzare@redhat.com>
To: Wei Yang <richardw.yang@linux.intel.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org,
	jasowang@redhat.com, richard.henderson@linaro.org,
	dgilbert@redhat.com, mreitz@redhat.com, alex.bennee@linaro.org
Subject: Re: [PATCH 2/2] core: replace sysconf(_SC_PAGESIZE) with qemu_real_host_page_size
Date: Mon, 11 Nov 2019 11:06:41 +0100	[thread overview]
Message-ID: <20191111100641.uvi47rjjb3ink5jl@steredhat> (raw)
In-Reply-To: <20191015031350.4345-3-richardw.yang@linux.intel.com>

Why "core:" in the commit title?

Perhaps to indicate that the patch concerns different subsystems,
I'd use "qemu: ", but I'm not sure :-)

On Tue, Oct 15, 2019 at 11:13:50AM +0800, Wei Yang wrote:
> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
> Suggested-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> CC: Richard Henderson <richard.henderson@linaro.org>
> ---
>  block/file-posix.c              | 2 +-
>  net/l2tpv3.c                    | 2 +-
>  tests/tcg/multiarch/test-mmap.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 5d1995a07c..853ed42134 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -2562,7 +2562,7 @@ static void check_cache_dropped(BlockDriverState *bs, Error **errp)
>      off_t end;
>  
>      /* mincore(2) page status information requires 1 byte per page */
> -    page_size = sysconf(_SC_PAGESIZE);
> +    page_size = qemu_real_host_page_size;
>      vec = g_malloc(DIV_ROUND_UP(window_size, page_size));
>  
>      end = raw_getlength(bs);
> diff --git a/net/l2tpv3.c b/net/l2tpv3.c
> index 55fea17c0f..5f843240de 100644
> --- a/net/l2tpv3.c
> +++ b/net/l2tpv3.c
> @@ -41,7 +41,7 @@
>   * chosen to be sufficient to accommodate one packet with some headers
>   */
>  
> -#define BUFFER_ALIGN sysconf(_SC_PAGESIZE)
> +#define BUFFER_ALIGN qemu_real_host_page_size
>  #define BUFFER_SIZE 2048
>  #define IOVSIZE 2
>  #define MAX_L2TPV3_MSGCNT 64
> diff --git a/tests/tcg/multiarch/test-mmap.c b/tests/tcg/multiarch/test-mmap.c
> index 9ea49e2307..370842e5c2 100644
> --- a/tests/tcg/multiarch/test-mmap.c
> +++ b/tests/tcg/multiarch/test-mmap.c
> @@ -466,7 +466,7 @@ int main(int argc, char **argv)
>      if (argc > 1) {
>          qemu_strtoul(argv[1], NULL, 0, &pagesize);
>      } else {
> -        pagesize = sysconf(_SC_PAGESIZE);
> +        pagesize = qemu_real_host_page_size;
>      }
>  
>      /* Assume pagesize is a power of two.  */

The patch LGTM:
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>

Thanks,
Stefano



  reply	other threads:[~2019-11-11 10:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  3:13 [PATCH 0/2] replace sysconf(_SC_PAGESIZE) with qemu_real_host_page_size Wei Yang
2019-10-15  3:13 ` [PATCH 1/2] tests/tcg/multiarch: fix code style in function main of test-mmap.c Wei Yang
2019-11-11  9:57   ` Stefano Garzarella
2019-11-11 10:25   ` Alex Bennée
2019-11-11 15:47     ` Wei Yang
2019-11-11 16:00       ` Alex Bennée
2019-10-15  3:13 ` [PATCH 2/2] core: replace sysconf(_SC_PAGESIZE) with qemu_real_host_page_size Wei Yang
2019-11-11 10:06   ` Stefano Garzarella [this message]
2019-11-11 15:46     ` Wei Yang
2019-11-09  1:25 ` [PATCH 0/2] " Wei Yang

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=20191111100641.uvi47rjjb3ink5jl@steredhat \
    --to=sgarzare@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=richardw.yang@linux.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;
as well as URLs for NNTP newsgroup(s).