[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87frmvd0ja.ffs@tglx>
Date: Tue, 10 Dec 2024 16:23:53 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org
Cc: André Almeida <andrealmeid@...lia.com>, Darren Hart
<dvhart@...radead.org>, Davidlohr Bueso <dave@...olabs.net>, Ingo Molnar
<mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>, Peter Zijlstra
<peterz@...radead.org>, Valentin Schneider <vschneid@...hat.com>, Waiman
Long <longman@...hat.com>, Sebastian Andrzej Siewior
<bigeasy@...utronix.de>
Subject: Re: [PATCH v4 02/11] futex: Add basic infrastructure for local task
local hash.
On Tue, Dec 03 2024 at 17:42, Sebastian Andrzej Siewior wrote:
> long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout,
> u32 __user *uaddr2, u32 val2, u32 val3);
> +int futex_hash_prctl(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5);
> +int futex_hash_allocate_default(void);
> +void futex_hash_free(struct mm_struct *mm);
> +
> +static inline void futex_mm_init(struct mm_struct *mm)
> +{
> + mm->futex_hash_bucket = NULL;
> +}
> +
> #else
> static inline void futex_init_task(struct task_struct *tsk) { }
> static inline void futex_exit_recursive(struct task_struct *tsk) { }
> @@ -88,6 +98,18 @@ static inline long do_futex(u32 __user *uaddr, int op, u32 val,
> {
> return -EINVAL;
> }
> +static inline int futex_hash_prctl(unsigned long arg2, unsigned long arg3,
> + unsigned long arg4, unsigned long arg5)
> +{
> + return -EINVAL;
> +}
> +static inline int futex_hash_allocate_default(void)
> +{
> + return 0;
> +}
> +static inline void futex_hash_free(struct mm_struct *mm) { }
> +static inline void futex_mm_init(struct mm_struct *mm) { }
> +
> #endif
>
> #endif
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index 7361a8f3ab68e..b16b97ab8fb2a 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -30,6 +30,7 @@
> #define INIT_PASID 0
>
> struct address_space;
> +struct futex_hash_bucket;
> struct mem_cgroup;
>
> /*
> @@ -902,6 +903,8 @@ struct mm_struct {
> int mm_lock_seq;
> #endif
>
> + unsigned int futex_hash_mask;
> + struct futex_hash_bucket *futex_hash_bucket;
So you provided stubs for the accessors/init functions etc. Shouldn't
this be #ifdef guarded too?
Thanks,
tglx
Powered by blists - more mailing lists