mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1] zsmalloc: zs_object_copy: replace email link to doc
@ 2022-08-15 14:48 Alexey Romanov
  2022-09-01  1:21 ` Sergey Senozhatsky
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Romanov @ 2022-08-15 14:48 UTC (permalink / raw)
  To: minchan, senozhatsky, ngupta, akpm
  Cc: linux-mm, linux-kernel, kernel, Alexey Romanov

Emails are not documentation.

Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
---
 mm/zsmalloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 99d93a48cbe0..17641bde5432 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1559,8 +1559,8 @@ static void zs_object_copy(struct size_class *class, unsigned long dst,
          * Calling kunmap_atomic(d_addr) is necessary. kunmap_atomic()
          * calls must occurs in reverse order of calls to kmap_atomic().
          * So, to call kunmap_atomic(s_addr) we should first call
-         * kunmap_atomic(d_addr).  For more details see
-         * https://lore.kernel.org/linux-mm/5512421D.4000603@samsung.com/
+         * kunmap_atomic(d_addr). For more details see
+         * Documentation/mm/highmem
          */
         if (s_off >= PAGE_SIZE) {
             kunmap_atomic(d_addr);
-- 
2.25.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v1] zsmalloc: zs_object_copy: replace email link to doc
  2022-08-15 14:48 [PATCH v1] zsmalloc: zs_object_copy: replace email link to doc Alexey Romanov
@ 2022-09-01  1:21 ` Sergey Senozhatsky
  0 siblings, 0 replies; 2+ messages in thread
From: Sergey Senozhatsky @ 2022-09-01  1:21 UTC (permalink / raw)
  To: Alexey Romanov, Minchan Kim, Andrew Morton
  Cc: senozhatsky, ngupta, linux-mm, linux-kernel, kernel

On (22/08/15 17:48), Alexey Romanov wrote:
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 99d93a48cbe0..17641bde5432 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1559,8 +1559,8 @@ static void zs_object_copy(struct size_class *class, unsigned long dst,
>           * Calling kunmap_atomic(d_addr) is necessary. kunmap_atomic()
>           * calls must occurs in reverse order of calls to kmap_atomic().
>           * So, to call kunmap_atomic(s_addr) we should first call
> -         * kunmap_atomic(d_addr).  For more details see
> -         * https://lore.kernel.org/linux-mm/5512421D.4000603@samsung.com/
> +         * kunmap_atomic(d_addr). For more details see
> +         * Documentation/mm/highmem
>           */
>          if (s_off >= PAGE_SIZE) {
>              kunmap_atomic(d_addr);

So I'm not against this patch, but in general I don't think we document
kmap_atomic/kunmap_atomic in the kernel. That's type of API that people
get BUG() on and then figure out that it's a stack and pop-s should
mirror push-es. We have lots of undocumented src/dst kmap-s:

                src = kmap_atomic(s_page);
                dst = kmap_atomic(d_page);
                do_copy_page(dst, src);
                kunmap_atomic(dst);
                kunmap_atomic(src);

Like I said, I'm not against this patch, so FWIW
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

I'll let Minchan to have the final word.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-01  1:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 14:48 [PATCH v1] zsmalloc: zs_object_copy: replace email link to doc Alexey Romanov
2022-09-01  1:21 ` Sergey Senozhatsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®