make some parts of memory region which comes from cudaMallocManaged as pinned

I want some parts are pinned on host, the others are pageable. For example,

cudaMallocManaged(&data, size, …)
cudaMemAdvise(data+offset, pageSize, cudaMemAdviseSetPreferredLocation, cpuid)
cudaMemAdvise(data+offset, pageSize, cudaMemAdviseSetAccessedBy, gpuid)

But the executed results is not the same as the one using cudaHostAlloc(&data, size, …)

Is any way to achieve this?

It’s not possible to pin memory that is in a managed allocation.

That’s not what managed memory is for anyway. Managed memory migrates to the processor that attempts to use it.