linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Perevalov <a.perevalov@samsung.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: linux-mm@kvack.org, rppt@linux.vnet.ibm.com,
	mike.kravetz@oracle.com, dgilbert@redhat.com
Subject: Re: [PATCH v3] userfaultfd: provide pid in userfault msg
Date: Wed, 05 Apr 2017 15:42:18 +0300	[thread overview]
Message-ID: <a442cd0f-87a6-2a88-8139-3dc2f4e92620@samsung.com> (raw)
In-Reply-To: <20170404190419.GA5081@redhat.com>

On 04/04/2017 10:04 PM, Andrea Arcangeli wrote:
> Hello Alexey,
>
> v3 looks great to me.
>
> Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
>
> On top of v3 I think we could add this to make it more obvious to the
> developer tpid isn't necessarily there by just looking at the data
> structure.
>
> This is purely cosmetical, so feel free to comment if you
> disagree.
Why not, I agree with this change.

>
> I'm also fine to add an anonymous union later if a new usage for those
> bytes emerges (ABI side doesn't change anything which is why this
> could be done later as well, only the API changes here but then I
> doubt we'd break the API later for this, so if we want pagefault.feat.*
> it probably should be done right now).
>
> Thanks,
> Andrea
>
> >From 901951f5a0456aa07d4fb1231cf2b1d352beb36f Mon Sep 17 00:00:00 2001
> From: Andrea Arcangeli <aarcange@redhat.com>
> Date: Tue, 4 Apr 2017 20:50:54 +0200
> Subject: [PATCH 1/1] userfaultfd: provide pid in userfault msg - add feat
>   union
>
> No ABI change, but this will make it more explicit to software that
> ptid is only available if requested by passing UFFD_FEATURE_THREAD_ID
> to UFFDIO_API. The fact it's a union will also self document it
> shouldn't be taken for granted there's a tpid there.
>
> Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
> ---
>   include/uapi/linux/userfaultfd.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h
> index ff8d0d2..524b860 100644
> --- a/include/uapi/linux/userfaultfd.h
> +++ b/include/uapi/linux/userfaultfd.h
> @@ -84,7 +84,9 @@ struct uffd_msg {
>   		struct {
>   			__u64	flags;
>   			__u64	address;
> -			__u32   ptid;
> +			union {
> +				__u32 ptid;
> +			} feat;
>   		} pagefault;
>   
>   		struct {
>
>
>
>


-- 
Best regards,
Alexey Perevalov

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-04-05 12:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170403093307eucas1p2e1110dd2550426c53a7b8825efa34f99@eucas1p2.samsung.com>
2017-04-03  9:32 ` [PATCH v3] Illuminate thread id to user space Alexey Perevalov
     [not found]   ` <CGME20170403093318eucas1p2ebd57e5e4c33707063687ccd571f67bb@eucas1p2.samsung.com>
2017-04-03  9:32     ` [PATCH v3] userfaultfd: provide pid in userfault msg Alexey Perevalov
2017-04-04 19:04       ` Andrea Arcangeli
2017-04-05 12:42         ` Alexey Perevalov [this message]
2017-04-03  9:38   ` [PATCH v3] please don't see patch set Alexey Perevalov
2017-04-03  9:42     ` Alexey Perevalov

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=a442cd0f-87a6-2a88-8139-3dc2f4e92620@samsung.com \
    --to=a.perevalov@samsung.com \
    --cc=aarcange@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rppt@linux.vnet.ibm.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