lkml.org 
[lkml]   [2020]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/26] perf tools: Add build_id__is_defined function
On Mon, Sep 14, 2020 at 01:03:18PM -0300, Arnaldo Carvalho de Melo wrote:

SNIP

> + if (!ns) {
> + status = NVME_SC_INVALID_NS | NVME_SC_DNR;
> + goto out;
> + }
> +
> + if (memchr_inv(&ns->uuid, 0, sizeof(ns->uuid))) {
> + status = nvmet_copy_ns_identifier(req, NVME_NIDT_UUID,
> + NVME_NIDT_UUID_LEN,
> + &ns->uuid, &off);
> + if (status)
> + goto out_put_ns;
> + }
>
> More:
>
> [acme@five perf]$ find arch/ -type f | xargs grep memchr_inv
> arch/x86/kernel/fpu/xstate.c: if (memchr_inv(hdr->reserved, 0, sizeof(hdr->reserved)))
> arch/x86/mm/init_64.c: if (!memchr_inv(page_addr, PAGE_INUSE, PAGE_SIZE)) {
> arch/x86/mm/init_64.c: if (!memchr_inv(page_addr, PAGE_INUSE,
> arch/x86/mm/init_64.c: if (!memchr_inv(page_addr, PAGE_INUSE,
> arch/s390/mm/vmem.c: return !memchr_inv(page, PAGE_UNUSED, PMD_SIZE);
> arch/powerpc/platforms/powermac/nvram.c: if (memchr_inv(base, 0xff, NVRAM_SIZE)) {
> arch/powerpc/platforms/powermac/nvram.c: if (memchr_inv(base, 0xff, NVRAM_SIZE)) {
> [acme@five perf]$

nice, another stricg.c candidate ;-)

I can add the is_zeroed function and we can speed it up
for above archs later

thanks,
jirka

\
 
 \ /
  Last update: 2020-09-14 22:50    [W:0.334 / U:0.420 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site