From: "Garg, Shivank" <shivankg@amd.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Subject: Understanding behavior of memcpy_count and bytes_transferred in dmaengine
Date: Thu, 6 Jun 2024 10:44:44 +0530 [thread overview]
Message-ID: <23afcee2-e936-4e99-8fa1-6fef9740ffa7@amd.com> (raw)
Hi Community,
I want to understand how/when memcpy_count and bytes_transferred are increased.
/sys/devices/pci0000:00/0000:00:07.1/0000:03:00.2/dma/dma0chan0$ ls
bytes_transferred device in_use memcpy_count power subsystem uevent
I did some experiments with a test kernel driver (doing simple memcpy from 1 NUMA node to another) and dmatest kernel module.
In my testing, both bytes_transferred or memcpy_count remain zero in all testing.
However, I observed in_use is changes to 1 when the channel is requested.
Inside the dmaengine: count += per_cpu_ptr(chan->local, i)->memcpy_count;
I checked these variable to understand if my kernel driver is actually copying any data using DMA but it left me more confused.
Can you please help in understanding its behavior?
Thanks,
Shivank
reply other threads:[~2024-06-06 5:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23afcee2-e936-4e99-8fa1-6fef9740ffa7@amd.com \
--to=shivankg@amd.com \
--cc=dmaengine@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.