linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Charan Teja Kalla <quic_charante@quicinc.com>
To: <akpm@linux-foundation.org>, <mhocko@suse.com>,
	<minchan@kernel.org>, <surenb@google.com>, <vbabka@suse.cz>,
	<rientjes@google.com>, <nadav.amit@gmail.com>,
	<edgararriaga@google.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>,
	Charan Teja Kalla <quic_charante@quicinc.com>
Subject: [PATCH 0/2] mm: madvise: return exact bytes advised with process_madvise under error
Date: Wed, 23 Mar 2022 20:54:08 +0530	[thread overview]
Message-ID: <cover.1648046642.git.quic_charante@quicinc.com> (raw)

Under error conditions, process_madvise() is not returning the exact
bytes processed in a iovec element thus user may repeat the advise on
vma ranges contained in the iovec element despite those ranges are
already processed. This problem is partially solved with commit
08095d6310a7 ("mm: madvise: skip unmapped vma holes passed to
process_madvise") for ENOMEM return types. These patches try to solve
the problem for other error return types.

Starting this as new discussion, as the back ground for these changes
are coming from below patches, which are already merged into linus tree:
1) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5bd009c7c9a9e888077c07535dc0c70aeab242c3
2) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=08095d6310a7ce43256b4251577bc66a25c6e1a6

and lore archives for the above changes:
1) V2: https://lore.kernel.org/linux-mm/cover.1647008754.git.quic_charante@quicinc.com/
2) V1: https://lore.kernel.org/linux-mm/1646803679-11433-1-git-send-email-quic_charante@quicinc.com/

Charan Teja Kalla (1):
  Revert "mm: madvise: skip unmapped vma holes passed to
    process_madvise"

Charan Teja Reddy (1):
  mm: madvise: return exact bytes advised with process_madvise under
    error

 mm/madvise.c | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 88 insertions(+), 11 deletions(-)

-- 
2.7.4


             reply	other threads:[~2022-03-23 15:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 15:24 Charan Teja Kalla [this message]
2022-03-23 15:24 ` [PATCH 1/2] Revert "mm: madvise: skip unmapped vma holes passed to process_madvise" Charan Teja Kalla
2022-03-24 12:48   ` Michal Hocko
2022-03-24 14:03     ` Charan Teja Kalla
2022-03-23 15:24 ` [PATCH 2/2] mm: madvise: return exact bytes advised with process_madvise under error Charan Teja Kalla
2022-03-24 13:14   ` Michal Hocko
2022-03-24 15:45     ` Charan Teja Kalla
2022-03-25  0:46       ` Minchan Kim
2022-03-25  0:48       ` Minchan Kim
2022-03-25  8:02       ` Michal Hocko

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=cover.1648046642.git.quic_charante@quicinc.com \
    --to=quic_charante@quicinc.com \
    --cc=akpm@linux-foundation.org \
    --cc=edgararriaga@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=nadav.amit@gmail.com \
    --cc=rientjes@google.com \
    --cc=surenb@google.com \
    --cc=vbabka@suse.cz \
    /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).