From: Matthew Wilcox <willy@infradead.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Souptick Joarder <jrdr.linux@gmail.com>, linux-mm@kvack.org
Subject: Re: [PATCH] mm: Change return type to vm_fault_t
Date: Thu, 8 Mar 2018 14:55:01 -0800 [thread overview]
Message-ID: <20180308225501.GC29073@bombadil.infradead.org> (raw)
In-Reply-To: <20180308142658.285e0b2ab50b81449783cd4a@linux-foundation.org>
On Thu, Mar 08, 2018 at 02:26:58PM -0800, Andrew Morton wrote:
> On Thu, 8 Mar 2018 18:35:23 +0530 Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> > Use new return type vm_fault_t for fault handler
> > in struct vm_operations_struct.
>
> I can't find vm_fault_t?
Way down at the bottom, in mm_types.h. mm.h is a bit heavyweight,
and we need vm_fault_t in vm_special_mapping->fault.
> > vmf_insert_mixed(), vmf_insert_pfn() and vmf_insert_page()
> > are newly added inline wrapper functions.
>
> Why?
The various drivers that get converted will need them (or something
similar to them). I think eventually we can convert vm_insert_foo() into
vmf_insert_foo() and remove these inline wrappers, but these are a good
intermediate step.
> Well if we're going to do this then we should convert all the
> .page_mkwrite() instances and a bunch of other stuff to use vm_fault_t.
> It's a lot of work. Perhaps we should just keep using "int".
We've had bugs before where drivers returned -EFOO. And we have this
silly inefficiency where vm_insert_foo() return an errno which (afaict)
every driver then converts into a VM_FAULT code. Souptick's willing to do
the work; Michal Hocko agrees it's worth doing; I'm willing to supervise.
It seems worth faciitating.
next prev parent reply other threads:[~2018-03-08 22:55 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 13:05 [PATCH] mm: Change return type to vm_fault_t Souptick Joarder
2018-03-08 22:22 ` Matthew Wilcox
2018-03-08 23:22 ` Andrew Morton
2018-03-08 23:48 ` Matthew Wilcox
2018-03-09 6:28 ` Souptick Joarder
2018-03-08 22:26 ` Andrew Morton
2018-03-08 22:55 ` Matthew Wilcox [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-04-14 21:33 Souptick Joarder
2018-05-29 14:31 Souptick Joarder
2018-05-29 14:50 ` Matthew Wilcox
2018-05-29 15:55 ` Souptick Joarder
2018-05-29 17:34 ` Matthew Wilcox
2018-05-30 3:40 ` Souptick Joarder
2018-05-30 11:16 ` Matthew Wilcox
2018-06-02 14:44 ` Souptick Joarder
2018-06-02 14:44 ` Souptick Joarder
2018-06-02 14:55 ` Souptick Joarder
2018-06-02 14:59 ` Luc Van Oostenryck
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=20180308225501.GC29073@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=jrdr.linux@gmail.com \
--cc=linux-mm@kvack.org \
/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).