public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	viro@zeniv.linux.org.uk, schwidefsky@de.ibm.com,
	rientjes@google.com, riel@redhat.com, mingo@kernel.org,
	mgorman@suse.de,
	kirill shutemov <kirill.shutemov@linux.intel.com>,
	heiko carstens <heiko.carstens@de.ibm.com>,
	hannes@cmpxchg.org, gerald schaefer <gerald.schaefer@de.ibm.com>,
	ebiederm@xmission.com, aarcange@redhat.com
Subject: Re: +	mm-revert-thp-make-madv_hugepage-check-for-mm-def_flags.patch added	to -mm tree
Date: Wed, 26 Feb 2014 15:41:32 -0500 (EST)	[thread overview]
Message-ID: <842178473.10219645.1393447292444.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20140226180603.GA25644@redhat.com>


> +#ifdef CONFIG_S390
> +		/*
> +		 * MADV_HUGEPAGE is broken after s390_enable_sie(), qemu
> +		 * blindly does madvise(MADV_HUGEPAGE) for for all kvm pages
> +		 * and expects it must fail on s390. Avoid a possible SIGSEGV
> +		 * until qemu is changed.
> +		 */
> +		if (mm_has_pgste(vma->vm_mm))
> +			return -EINVAL;
> +#endif

The comment is not quite true.  QEMU doesn't expect that the madvise fails.
It simply expects that the madvise doesn't cause SIGSEGVs or later
malfunctioning, because (quoting tha man page) madvise "does not influence
the semantics of the application".

There's nothing to fix in QEMU, in fact I believe this should return 0
rather than -EINVAL.  It's perfectly legal for the kernel to ignore an madvise,
and this is what should happen here.

Paolo

  parent reply	other threads:[~2014-02-26 20:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <530d2ce9.eikv0ULecNwxF4I5%akpm@linux-foundation.org>
     [not found] ` <530D9F50.1080400@de.ibm.com>
2014-02-26 14:50   ` + mm-revert-thp-make-madv_hugepage-check-for-mm-def_flags.patch added to -mm tree Oleg Nesterov
2014-02-26 15:06     ` Christian Borntraeger
2014-02-26 15:22       ` Kirill A. Shutemov
2014-02-26 15:31       ` Oleg Nesterov
2014-02-26 16:55         ` Gerald Schaefer
2014-02-26 16:57         ` Peter Zijlstra
2014-02-26 17:22           ` Alex Thorlton
2014-02-26 18:06             ` Oleg Nesterov
2014-02-26 19:05               ` Gerald Schaefer
2014-02-27 16:45                 ` Oleg Nesterov
2014-02-26 19:27               ` Christian Borntraeger
2014-02-26 19:39                 ` Alex Thorlton
2014-02-26 23:24                   ` Andrew Morton
2014-02-27  0:01                     ` Alex Thorlton
2014-02-27 17:26                       ` Alex Thorlton
2014-02-26 20:41               ` Paolo Bonzini [this message]
2014-02-27 16:34                 ` Oleg Nesterov
2014-02-26 18:08           ` Oleg Nesterov

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=842178473.10219645.1393447292444.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=athorlton@sgi.com \
    --cc=borntraeger@de.ibm.com \
    --cc=ebiederm@xmission.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=hannes@cmpxchg.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=rientjes@google.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=viro@zeniv.linux.org.uk \
    /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