Messages in this thread | | | Date | Mon, 14 Sep 2020 22:49:28 +0200 | From | Jiri Olsa <> | Subject | Re: [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
| |