diff mbox series

[v6,01/14] KVM: Documentation: Clarify meaning of hva_to_pfn()'s 'atomic' parameter

Message ID 20231109210325.3806151-2-amoorthy@google.com (mailing list archive)
State New, archived
Headers show
Series Improve KVM + userfaultfd performance via KVM_MEMORY_FAULT_EXITs on stage-2 faults | expand

Commit Message

Anish Moorthy Nov. 9, 2023, 9:03 p.m. UTC
The current docstring can be read as "atomic -> allowed to sleep," when
in fact the intended statement is "atomic -> NOT allowed to sleep." Make
that clearer in the docstring.

Signed-off-by: Anish Moorthy <amoorthy@google.com>
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sean Christopherson Feb. 7, 2024, 3:26 p.m. UTC | #1
This is not a Documentation change.  The comment might make its way to generated
docs, but this is not Documentation/ and I most definitely did not expect a change
to kvm_main.c based on the scope.

On Thu, Nov 09, 2023, Anish Moorthy wrote:
> The current docstring can be read as "atomic -> allowed to sleep," when
> in fact the intended statement is "atomic -> NOT allowed to sleep." Make
> that clearer in the docstring.
> 
> Signed-off-by: Anish Moorthy <amoorthy@google.com>
> ---
>  virt/kvm/kvm_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 9170a61ea99f..687374138cfd 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -2983,7 +2983,7 @@ static int hva_to_pfn_remapped(struct vm_area_struct *vma,
>  /*
>   * Pin guest page in memory and return its pfn.
>   * @addr: host virtual address which maps memory to the guest
> - * @atomic: whether this function can sleep
> + * @atomic: whether this function is forbidden from sleeping
>   * @interruptible: whether the process can be interrupted by non-fatal signals
>   * @async: whether this function need to wait IO complete if the
>   *         host page is not in the memory
> -- 
> 2.42.0.869.gea05f2083d-goog
>
Anish Moorthy Feb. 7, 2024, 6:44 p.m. UTC | #2
On Wed, Feb 7, 2024 at 7:26 AM Sean Christopherson <seanjc@google.com> wrote:
>
> This is not a Documentation change.  The comment might make its way to generated
> docs, but this is not Documentation/ and I most definitely did not expect a change
> to kvm_main.c based on the scope.

Whoops, didn't realize that Documentation: carried that specific
meaning- thanks for letting me know
diff mbox series

Patch

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 9170a61ea99f..687374138cfd 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2983,7 +2983,7 @@  static int hva_to_pfn_remapped(struct vm_area_struct *vma,
 /*
  * Pin guest page in memory and return its pfn.
  * @addr: host virtual address which maps memory to the guest
- * @atomic: whether this function can sleep
+ * @atomic: whether this function is forbidden from sleeping
  * @interruptible: whether the process can be interrupted by non-fatal signals
  * @async: whether this function need to wait IO complete if the
  *         host page is not in the memory