lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Jan 2011 19:55:23 +0200
From:	Pekka Enberg <penberg@...nel.org>
To:	Nitin Gupta <ngupta@...are.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Pekka Enberg <penberg@...helsinki.fi>,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc:	Robert Jennings <rcj@...ux.vnet.ibm.com>
Subject: Re: [PATCH 4/7] zram/xvmalloc: free bit block insertion optimization

On Wed, Jan 26, 2011 at 7:25 PM, Robert Jennings <rcj@...ux.vnet.ibm.com> wrote:
> There is no need to set the bits in the first- and second-level indices
> to indicate a free page when we know that a free page existed at this
> level.
>
> Signed-off-by: Robert Jennings <rcj@...ux.vnet.ibm.com>

Why is it not necessary? I don't know that part of the code well
enough to tell if this patch is safe or not.

> ---
>  drivers/staging/zram/xvmalloc.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c
> index a507f95..b3622f1 100644
> --- a/drivers/staging/zram/xvmalloc.c
> +++ b/drivers/staging/zram/xvmalloc.c
> @@ -205,6 +205,8 @@ static void insert_block(struct xv_pool *pool, struct page *page, u32 offset,
>                nextblock->link.prev_page = page;
>                nextblock->link.prev_offset = offset;
>                put_ptr_atomic(nextblock, KM_USER1);
> +               /* If there was a next page then the free bits are set. */
> +               return;
>        }
>
>        __set_bit(slindex % BITS_PER_LONG, &pool->slbitmap[flindex]);
> --
> 1.6.0.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ