[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <61ce5a52-9c34-f936-b09b-f8f59cedcb66@linux.intel.com>
Date: Fri, 22 Nov 2019 19:01:41 +0300
From: Alexey Budankov <alexey.budankov@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Andi Kleen <ak@...ux.intel.com>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 2/3] perf mmap: declare type for cpu mask of arbitrary
length
On 22.11.2019 16:58, Alexey Budankov wrote:
> On 22.11.2019 16:20, Jiri Olsa wrote:
>> On Wed, Nov 20, 2019 at 12:37:48PM +0300, Alexey Budankov wrote:
>>>
<SNIP>
>>> +#define mmap_cpu_mask_bytes(m) \
>>
>> we try to have all macros upper case
>
> In v2.
>
>>
>>> + (BITS_TO_LONGS(((struct mmap_cpu_mask *)m)->nbits) * sizeof(unsigned long))
>>
>> we have BITS_TO_BYTES
>
> In v2.
Avoided BITS_TO_BYTES() in this particular case because
the storage is allocated in unsigned long chunks, thus
the possibly unused tail bytes at the last chunk would
be accounted in the returned size, and for compatibility
with cpu_set_t which is also allocated in unsigned longs.
~Alexey
Powered by blists - more mailing lists