Re: linux-next: Tree for Dec 16 (lib/842/842_decompress)

2015-12-18 Thread Dan Streetman
On Wed, Dec 16, 2015 at 3:23 PM, Randy Dunlap wrote: > On 12/15/15 21:43, Stephen Rothwell wrote: >> Hi all, >> >> Changes since 20151215: >> >> The drm-misc tree gained a conflict against Linus' tree. >> >> The i2c tree gained a build failure for which I applied a patch.

[PATCH] mm/zswap: change incorrect strncmp use to strcmp

2015-12-11 Thread Dan Streetman
and the passed in params are all guaranteed to be null terminated, so strcmp should be used. Reported-by: Weijie Yang Cc: Seth Jennings Signed-off-by: Dan Streetman --- mm/zswap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/zswap.c b/mm/zswap.c index 025f8dc

[PATCH] mm/zswap: change incorrect strncmp use to strcmp

2015-12-11 Thread Dan Streetman
and the passed in params are all guaranteed to be null terminated, so strcmp should be used. Reported-by: Weijie Yang <weijie.y...@samsung.com> Cc: Seth Jennings <sjenni...@variantweb.net> Signed-off-by: Dan Streetman <ddstr...@ieee.org> --- mm/zswap.c | 6 +++--- 1 file cha

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 5:57 PM, Daniel Axtens wrote: > Haren Myneni writes: > >> NX842 coprocessor sets bit 3 if queue is overflow. It is just for >> information to the user. So the driver prints this informative message >> and ignores it. > > What queue, and what happens when the queue

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 2:46 AM, Haren Myneni wrote: > > NX842 coprocessor sets bit 3 if queue is overflow. It is just for > information to the user. So the driver prints this informative message > and ignores it. > > Signed-off-by: Haren Myneni > > diff --git a/arch/powerpc/include/asm/icswx.h

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 2:46 AM, Haren Myneni wrote: > > NX842 coprocessor sets bit 3 if queue is overflow. It is just for > information to the user. So the driver prints this informative message > and ignores it. > > Signed-off-by: Haren Myneni > >

Re: crypto/nx842: Ignore queue overflow informative error

2015-12-07 Thread Dan Streetman
On Sun, Dec 6, 2015 at 5:57 PM, Daniel Axtens wrote: > Haren Myneni writes: > >> NX842 coprocessor sets bit 3 if queue is overflow. It is just for >> information to the user. So the driver prints this informative message >> and ignores it. > > What

Re: [PATCH] crypto: nx: use of_property_read_u32()

2015-11-23 Thread Dan Streetman
On Mon, Nov 23, 2015 at 4:56 AM, Saurabh Sengar wrote: > use of_propert_read_u32() for reading int value, > it can help reducing number of variables used > > Signed-off-by: Saurabh Sengar Acked-by: Dan Streetman > --- > drivers/crypto/nx/nx-842-powernv.c | 11 --- &g

Re: [PATCH] crypto: nx: use of_property_read_u32()

2015-11-23 Thread Dan Streetman
On Mon, Nov 23, 2015 at 4:56 AM, Saurabh Sengar <saurabh.tr...@gmail.com> wrote: > use of_propert_read_u32() for reading int value, > it can help reducing number of variables used > > Signed-off-by: Saurabh Sengar <saurabh.tr...@gmail.com> Acked-by: Dan Stre

[PATCHv3] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
with a negative dst_ops count while another winds up with a continually increasing count, eventually reaching its gc_thresh limit, which causes all new traffic on the net namespace to fail with -ENOBUFS. Signed-off-by: Dan Streetman Signed-off-by: Dan Streetman --- Changes since v2: remove no longer

Re: [PATCHv2] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
On Thu, Oct 29, 2015 at 7:57 AM, kbuild test robot wrote: > Hi Dan, > > [auto build test WARNING on ipsec/master -- if it's inappropriate base, > please suggest rules for selecting the more suitable base] > > url: > https://github.com/0day-ci/linux/commits/Dan-Streetman/

[PATCHv2] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
with a negative dst_ops count while another winds up with a continually increasing count, eventually reaching its gc_thresh limit, which causes all new traffic on the net namespace to fail with -ENOBUFS. Signed-off-by: Dan Streetman Signed-off-by: Dan Streetman --- Changes since v1: move dst copying

Re: [PATCHv2] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
On Thu, Oct 29, 2015 at 7:57 AM, kbuild test robot <l...@intel.com> wrote: > Hi Dan, > > [auto build test WARNING on ipsec/master -- if it's inappropriate base, > please suggest rules for selecting the more suitable base] > > url: > https://github.com/0day-ci/linux

[PATCHv2] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
with a negative dst_ops count while another winds up with a continually increasing count, eventually reaching its gc_thresh limit, which causes all new traffic on the net namespace to fail with -ENOBUFS. Signed-off-by: Dan Streetman <dan.street...@canonical.com> Signed-off-by: Dan Streetman

[PATCHv3] xfrm: dst_entries_init() per-net dst_ops

2015-10-29 Thread Dan Streetman
with a negative dst_ops count while another winds up with a continually increasing count, eventually reaching its gc_thresh limit, which causes all new traffic on the net namespace to fail with -ENOBUFS. Signed-off-by: Dan Streetman <dan.street...@canonical.com> Signed-off-by: Dan Streetman

Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-28 Thread Dan Streetman
On Wed, Oct 28, 2015 at 9:42 AM, Hannes Frederic Sowa wrote: > Hello, > > On Wed, Oct 28, 2015, at 14:32, Dan Streetman wrote: >> On Tue, Oct 27, 2015 at 12:15 PM, wrote: >> > From: Dan Streetman >> > >> > The ipv4 and ipv6 xfrms each create a

Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-28 Thread Dan Streetman
On Tue, Oct 27, 2015 at 12:15 PM, wrote: > From: Dan Streetman > > The ipv4 and ipv6 xfrms each create a template dst_ops object, and > perform dst_entries_init() on the template objects. Then each net > namespace has its net.xfrm.xfrm[46]_dst_ops field set to the te

Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-28 Thread Dan Streetman
On Tue, Oct 27, 2015 at 12:15 PM, <dan.street...@canonical.com> wrote: > From: Dan Streetman <dan.street...@canonical.com> > > The ipv4 and ipv6 xfrms each create a template dst_ops object, and > perform dst_entries_init() on the template objects. Then each net > name

Re: [PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-28 Thread Dan Streetman
On Wed, Oct 28, 2015 at 9:42 AM, Hannes Frederic Sowa <han...@stressinduktion.org> wrote: > Hello, > > On Wed, Oct 28, 2015, at 14:32, Dan Streetman wrote: >> On Tue, Oct 27, 2015 at 12:15 PM, <dan.street...@canonical.com> wrote: >> > From: Dan St

[PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Dan Streetman
The driver currently waits 1us after issuing a RST, but the spec requires it to wait 1ms. This adds a msleep(1) before polling the reset bit. Signed-off-by: Dan Streetman Signed-off-by: Dan Streetman --- changes since v1: use msleep(1) instead of mdelay(1), per Peter Hurley move msleep(1

Re: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Dan Streetman
, Jesse; Nelson, Shannon; Wyborny, Carolyn; Skidmore, >> Donald C; Vick, Matthew; Ronciak, John; Williams, Mitch A; intel-wired- >> l...@lists.osuosl.org; net...@vger.kernel.org; linux-kernel@vger.kernel.org; >> Dan Streetman; Dan Streetman >> Subject: [PATCH]

Re: [PATCH] ixgbe: check Master Disable bit after setting

2015-10-27 Thread Dan Streetman
, Jesse; Nelson, Shannon; Wyborny, Carolyn; Skidmore, >> Donald C; Vick, Matthew; Ronciak, John; Williams, Mitch A; intel-wired- >> l...@lists.osuosl.org; net...@vger.kernel.org; linux-kernel@vger.kernel.org; >> Dan Streetman; Dan Streetman >> Subject: [PATCH] ixgbe

[PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-27 Thread dan . streetman
From: Dan Streetman The ipv4 and ipv6 xfrms each create a template dst_ops object, and perform dst_entries_init() on the template objects. Then each net namespace has its net.xfrm.xfrm[46]_dst_ops field set to the template values. The problem with that is the dst_ops.pcpuc_entries field

[PATCH] xfrm: dst_entries_init() per-net dst_ops

2015-10-27 Thread dan . streetman
From: Dan Streetman <dan.street...@canonical.com> The ipv4 and ipv6 xfrms each create a template dst_ops object, and perform dst_entries_init() on the template objects. Then each net namespace has its net.xfrm.xfrm[46]_dst_ops field set to the template values. The p

Re: [PATCH] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Dan Streetman
irsher, Jeffrey T >> Cc: Brandeburg, Jesse; Nelson, Shannon; Wyborny, Carolyn; Skidmore, >> Donald C; Vick, Matthew; Ronciak, John; Williams, Mitch A; intel-wired- >> l...@lists.osuosl.org; net...@vger.kernel.org; linux-kernel@vger.kernel.org; >> Dan Streetman; Dan Streetman >

Re: [PATCH] ixgbe: check Master Disable bit after setting

2015-10-27 Thread Dan Streetman
irsher, Jeffrey T >> Cc: Brandeburg, Jesse; Nelson, Shannon; Wyborny, Carolyn; Skidmore, >> Donald C; Vick, Matthew; Ronciak, John; Williams, Mitch A; intel-wired- >> l...@lists.osuosl.org; net...@vger.kernel.org; linux-kernel@vger.kernel.org; >> Dan Streetman; Dan Streetman

[PATCHv2] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-27 Thread Dan Streetman
The driver currently waits 1us after issuing a RST, but the spec requires it to wait 1ms. This adds a msleep(1) before polling the reset bit. Signed-off-by: Dan Streetman <dan.street...@canonical.com> Signed-off-by: Dan Streetman <ddstr...@ieee.org> --- changes since v1: use mslee

[PATCH] ixgbe: check Master Disable bit after setting

2015-10-26 Thread dan . streetman
From: Dan Streetman Spec section 8.2.4.1.1 notes that after setting the PCIe Master Disable bit, it must be read to verify it was set before polling the Master Enable status bit. This adds the check to verify the Master Disable bit was set. This also corrects the spec section number reference

[PATCH] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-26 Thread dan . streetman
From: Dan Streetman The driver currently waits 1us after issuing a RST, but the spec requires it to wait 1ms. Signed-off-by: Dan Streetman Signed-off-by: Dan Streetman --- drivers/net/ethernet/intel/ixgbe/ixgbe_x540.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH] ixgbe: check Master Disable bit after setting

2015-10-26 Thread dan . streetman
From: Dan Streetman <dan.street...@canonical.com> Spec section 8.2.4.1.1 notes that after setting the PCIe Master Disable bit, it must be read to verify it was set before polling the Master Enable status bit. This adds the check to verify the Master Disable bit was set. This also co

[PATCH] ixgbe: Wait for 1ms, not 1us, after RST

2015-10-26 Thread dan . streetman
From: Dan Streetman <dan.street...@canonical.com> The driver currently waits 1us after issuing a RST, but the spec requires it to wait 1ms. Signed-off-by: Dan Streetman <dan.street...@canonical.com> Signed-off-by: Dan Streetman <ddstr...@ieee.org> --- drivers/net/ethernet/inte

Re: [PATCH V3] crypto/nx842: Add CRC and validation support

2015-10-14 Thread Dan Streetman
On Wed, Oct 14, 2015 at 10:27 AM, Herbert Xu wrote: > On Thu, Oct 08, 2015 at 01:45:51PM -0700, Haren Myneni wrote: >> >> This patch adds CRC generation and validation support for nx-842. >> Add CRC flag so that nx842 coprocessor includes CRC during compression >> and validates during

Re: [PATCH V3] crypto/nx842: Add CRC and validation support

2015-10-14 Thread Dan Streetman
On Wed, Oct 14, 2015 at 10:27 AM, Herbert Xu wrote: > On Thu, Oct 08, 2015 at 01:45:51PM -0700, Haren Myneni wrote: >> >> This patch adds CRC generation and validation support for nx-842. >> Add CRC flag so that nx842 coprocessor includes CRC during compression >> and

Re: [PATCHv2 0/3] align zpool/zbud/zsmalloc on the api

2015-10-09 Thread Dan Streetman
On Sat, Sep 26, 2015 at 4:04 AM, Vitaly Wool wrote: > Here comes the second iteration over zpool/zbud/zsmalloc API alignment. > This time I divide it into three patches: for zpool, for zbud and for > zsmalloc :) > Patches are non-intrusive and do not change any existing functionality. They >

Re: [PATCHv2 0/3] align zpool/zbud/zsmalloc on the api

2015-10-09 Thread Dan Streetman
On Sat, Sep 26, 2015 at 4:04 AM, Vitaly Wool wrote: > Here comes the second iteration over zpool/zbud/zsmalloc API alignment. > This time I divide it into three patches: for zpool, for zbud and for > zsmalloc :) > Patches are non-intrusive and do not change any existing

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-24 Thread Dan Streetman
On Wed, Sep 23, 2015 at 5:54 AM, Herbert Xu wrote: > On Tue, Sep 22, 2015 at 11:08:22AM -0400, Dan Streetman wrote: >> >> you think we should just strip out the 842-nx alignment/sizing code >> and change it to fallback to the sw driver? > > Right, if the only intend

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-24 Thread Dan Streetman
On Wed, Sep 23, 2015 at 5:54 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Tue, Sep 22, 2015 at 11:08:22AM -0400, Dan Streetman wrote: >> >> you think we should just strip out the 842-nx alignment/sizing code >> and change it to fallback to the sw driver? >

Re: [PATCH v2] zbud: allow up to PAGE_SIZE allocations

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 8:17 AM, Vitaly Wool wrote: > Currently zbud is only capable of allocating not more than > PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE. This is okay as > long as only zswap is using it, but other users of zbud may > (and likely will) want to allocate up to PAGE_SIZE. This

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 6:18 AM, Vitaly Wool wrote: > Hi Dan, > > On Mon, Sep 21, 2015 at 6:17 PM, Dan Streetman wrote: >> Please make sure to cc Seth also, he's the owner of zbud. > > Sure :) > > >>> @@ -514,8 +552,17 @@ int zbud_reclaim_page(struct zbud_p

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 10:42 AM, Herbert Xu wrote: > On Tue, Sep 22, 2015 at 10:39:53AM -0400, Dan Streetman wrote: >> >> hmm, that's true, and that would simplify the code a lot! No need for >> the header anymore. But, since the sw driver is sooo much slower, it

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 8:21 AM, Herbert Xu wrote: > On Mon, Sep 21, 2015 at 11:21:14AM -0400, Dan Streetman wrote: >> >> As far as the hw and sw drivers producing the exact same output, I >> don't think that's possible with the current hw and sw drivers, >> because th

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 6:18 AM, Vitaly Wool <vitalyw...@gmail.com> wrote: > Hi Dan, > > On Mon, Sep 21, 2015 at 6:17 PM, Dan Streetman <ddstr...@ieee.org> wrote: >> Please make sure to cc Seth also, he's the owner of zbud. > > Sure :) > > >>> @

Re: [PATCH v2] zbud: allow up to PAGE_SIZE allocations

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 8:17 AM, Vitaly Wool wrote: > Currently zbud is only capable of allocating not more than > PAGE_SIZE - ZHDR_SIZE_ALIGNED - CHUNK_SIZE. This is okay as > long as only zswap is using it, but other users of zbud may > (and likely will) want to allocate

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 10:42 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Tue, Sep 22, 2015 at 10:39:53AM -0400, Dan Streetman wrote: >> >> hmm, that's true, and that would simplify the code a lot! No need for >> the header anymore. But, since the sw

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-22 Thread Dan Streetman
On Tue, Sep 22, 2015 at 8:21 AM, Herbert Xu <herb...@gondor.apana.org.au> wrote: > On Mon, Sep 21, 2015 at 11:21:14AM -0400, Dan Streetman wrote: >> >> As far as the hw and sw drivers producing the exact same output, I >> don't think that's possible with the current hw

Re: [PATCH 2/2] zpool/zsmalloc/zbud: align on interfaces

2015-09-21 Thread Dan Streetman
On Wed, Sep 16, 2015 at 7:53 AM, Vitaly Wool wrote: > As a preparation step for zram to be able to use common zpool API, > there has to be some alignment done on it. This patch adds > functions that correspond to zsmalloc-specific API to the common > zpool API and takes care of the callbacks that

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-21 Thread Dan Streetman
Please make sure to cc Seth also, he's the owner of zbud. On Wed, Sep 16, 2015 at 7:50 AM, Vitaly Wool wrote: > For zram to be able to use zbud via the common zpool API, > allocations of size PAGE_SIZE should be allowed by zpool. > zbud uses the beginning of an allocated page for its internal >

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-21 Thread Dan Streetman
On Fri, Sep 18, 2015 at 4:03 AM, Vitaly Wool wrote: >> I don't know how zsmalloc handles uncompressible PAGE_SIZE allocations, but >> I wouldn't expect it to be any more clever than this? So why duplicate the >> functionality in zswap and zbud? This could be handled e.g. at the zpool >> level? Or

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-21 Thread Dan Streetman
On Mon, Sep 21, 2015 at 10:26 AM, Herbert Xu wrote: > On Sat, Sep 19, 2015 at 05:02:42PM -0700, Haren Myneni wrote: >> Hi, >> >> This patch allows nx842 coprocessor to add CRC for compression and >> check the computed CRC value for uncompression. Please let me know >> if you have any comments. >>

Re: [PATCH] drivers/crypto/nx: Add CRC and validation support for nx842

2015-09-21 Thread Dan Streetman
On Mon, Sep 21, 2015 at 10:26 AM, Herbert Xu wrote: > On Sat, Sep 19, 2015 at 05:02:42PM -0700, Haren Myneni wrote: >> Hi, >> >> This patch allows nx842 coprocessor to add CRC for compression and >> check the computed CRC value for uncompression. Please let me know >>

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-21 Thread Dan Streetman
On Fri, Sep 18, 2015 at 4:03 AM, Vitaly Wool wrote: >> I don't know how zsmalloc handles uncompressible PAGE_SIZE allocations, but >> I wouldn't expect it to be any more clever than this? So why duplicate the >> functionality in zswap and zbud? This could be handled e.g. at

Re: [PATCH 2/2] zpool/zsmalloc/zbud: align on interfaces

2015-09-21 Thread Dan Streetman
On Wed, Sep 16, 2015 at 7:53 AM, Vitaly Wool wrote: > As a preparation step for zram to be able to use common zpool API, > there has to be some alignment done on it. This patch adds > functions that correspond to zsmalloc-specific API to the common > zpool API and takes care

Re: [PATCH 1/2] zbud: allow PAGE_SIZE allocations

2015-09-21 Thread Dan Streetman
Please make sure to cc Seth also, he's the owner of zbud. On Wed, Sep 16, 2015 at 7:50 AM, Vitaly Wool wrote: > For zram to be able to use zbud via the common zpool API, > allocations of size PAGE_SIZE should be allowed by zpool. > zbud uses the beginning of an allocated

Re: [PATCH v2 2/2] mm:zsmalloc: constify struct zs_pool name

2015-09-15 Thread Dan Streetman
On Fri, Sep 11, 2015 at 8:18 AM, Sergey Senozhatsky wrote: > Constify `struct zs_pool' ->name. > > Signed-off-by: Sergey Senozhatsky Acked-by: Dan Streetman > --- > include/linux/zpool.h| 6 -- > include/linux/zsmalloc.h | 2 +- > mm/zbud.c

Re: [RFC][PATCH] mm: make zbud znd zpool to depend on zswap

2015-09-15 Thread Dan Streetman
On Thu, Sep 10, 2015 at 8:28 AM, Sergey Senozhatsky wrote: > There are no zbud and zpool users besides zswap so enabling > (and building) CONFIG_ZPOOL and CONFIG_ZBUD make sense only > when CONFIG_ZSWAP is enabled. In other words, make those > options to depend on CONFIG_ZSWAP. Let's wait on

Re: [PATCH 3/3] zram: use common zpool interface

2015-09-15 Thread Dan Streetman
On Mon, Sep 14, 2015 at 9:12 PM, Sergey Senozhatsky wrote: > On (09/14/15 15:55), Vitaly Wool wrote: >> Update zram driver to use common zpool API instead of calling >> zsmalloc functions directly. This patch also adds a parameter >> that allows for changing underlying compressor storage to zbud.

Re: [RFC][PATCH] mm: make zbud znd zpool to depend on zswap

2015-09-15 Thread Dan Streetman
On Thu, Sep 10, 2015 at 8:28 AM, Sergey Senozhatsky wrote: > There are no zbud and zpool users besides zswap so enabling > (and building) CONFIG_ZPOOL and CONFIG_ZBUD make sense only > when CONFIG_ZSWAP is enabled. In other words, make those > options to depend on

Re: [PATCH v2 2/2] mm:zsmalloc: constify struct zs_pool name

2015-09-15 Thread Dan Streetman
On Fri, Sep 11, 2015 at 8:18 AM, Sergey Senozhatsky <sergey.senozhat...@gmail.com> wrote: > Constify `struct zs_pool' ->name. > > Signed-off-by: Sergey Senozhatsky <sergey.senozhat...@gmail.com> Acked-by: Dan Streetman <ddstr...@ieee.org> > --- > include/lin

Re: [PATCH 3/3] zram: use common zpool interface

2015-09-15 Thread Dan Streetman
On Mon, Sep 14, 2015 at 9:12 PM, Sergey Senozhatsky wrote: > On (09/14/15 15:55), Vitaly Wool wrote: >> Update zram driver to use common zpool API instead of calling >> zsmalloc functions directly. This patch also adds a parameter >> that allows for changing

Re: [PATCH 1/3] zram: make max_zpage_size configurable

2015-09-14 Thread Dan Streetman
On Mon, Sep 14, 2015 at 9:50 AM, Vitaly Wool wrote: > It makes sense to have control over what compression ratios are > ok to store pages uncompressed and what not. Moreover, if we end > up using zbud allocator for zram, any attempt to allocate a whole > page will fail, so we may want to avoid

Re: [PATCH 2/3] zpool/zsmalloc/zbud: align on interfaces

2015-09-14 Thread Dan Streetman
iff --git a/mm/zsmalloc.c b/mm/zsmalloc.c >> index f135b1b..f002f57 100644 >> --- a/mm/zsmalloc.c >> +++ b/mm/zsmalloc.c >> @@ -245,7 +245,7 @@ struct zs_pool { >> gfp_t flags;/* allocation flags used when growing pool */ >> atomic_long_t pages_

Re: [PATCH 0/3] allow zram to use zbud as underlying allocator

2015-09-14 Thread Dan Streetman
On Mon, Sep 14, 2015 at 10:14 AM, Vlastimil Babka wrote: > On 09/14/2015 04:12 PM, Vitaly Wool wrote: >> >> On Mon, Sep 14, 2015 at 4:01 PM, Vlastimil Babka wrote: >>> >>> >>> On 09/14/2015 03:49 PM, Vitaly Wool wrote: While using ZRAM on a small RAM footprint devices, together

Re: [PATCH 2/3] zpool/zsmalloc/zbud: align on interfaces

2015-09-14 Thread Dan Streetman
pool >> * @pool The zpool to check >> * >> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c >> index f135b1b..f002f57 100644 >> --- a/mm/zsmalloc.c >> +++ b/mm/zsmalloc.c >> @@ -245,7 +245,7 @@ struct zs_pool { >> gfp_t flags;/* allocation f

Re: [PATCH 0/3] allow zram to use zbud as underlying allocator

2015-09-14 Thread Dan Streetman
On Mon, Sep 14, 2015 at 10:14 AM, Vlastimil Babka wrote: > On 09/14/2015 04:12 PM, Vitaly Wool wrote: >> >> On Mon, Sep 14, 2015 at 4:01 PM, Vlastimil Babka wrote: >>> >>> >>> On 09/14/2015 03:49 PM, Vitaly Wool wrote: While using ZRAM on a small

Re: [PATCH 1/3] zram: make max_zpage_size configurable

2015-09-14 Thread Dan Streetman
On Mon, Sep 14, 2015 at 9:50 AM, Vitaly Wool wrote: > It makes sense to have control over what compression ratios are > ok to store pages uncompressed and what not. Moreover, if we end > up using zbud allocator for zram, any attempt to allocate a whole > page will fail, so

[PATCH 2/2] zswap: use charp for zswap param strings

2015-08-26 Thread Dan Streetman
Instead of using a fixed-length string for the zswap params, use charp. This simplifies the code and uses less memory, as most zswap param strings will be less than the current maximum length. Signed-off-by: Dan Streetman --- mm/zswap.c | 80

[PATCH 1/2] module: export param_free_charp()

2015-08-26 Thread Dan Streetman
Change the param_free_charp() function from static to exported. It is used by zswap in the next patch. Signed-off-by: Dan Streetman --- include/linux/moduleparam.h | 1 + kernel/params.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux

[PATCH 0/2] zswap: use charp type params instead of fixed-len strings

2015-08-26 Thread Dan Streetman
These patches change zswap to use charp type params instead of the existing fixed length char[] buffers for the zpool and compressor params. This saves memory and simplifies the param setting function. Dan Streetman (2): module: export param_free_charp() zswap: use charp for zswap param

[PATCH] zpool: remove redundant zpool->type string, const-ify zpool_get_type

2015-08-26 Thread Dan Streetman
e null-terminated. Signed-off-by: Dan Streetman --- include/linux/zpool.h | 2 +- mm/zpool.c| 14 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/linux/zpool.h b/include/linux/zpool.h index 42f8ec9..1f405be 100644 --- a/include/linux/zpool.h

[PATCH] zpool: remove redundant zpool-type string, const-ify zpool_get_type

2015-08-26 Thread Dan Streetman
-terminated. Signed-off-by: Dan Streetman ddstr...@ieee.org --- include/linux/zpool.h | 2 +- mm/zpool.c| 14 -- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/linux/zpool.h b/include/linux/zpool.h index 42f8ec9..1f405be 100644 --- a/include/linux

[PATCH 0/2] zswap: use charp type params instead of fixed-len strings

2015-08-26 Thread Dan Streetman
These patches change zswap to use charp type params instead of the existing fixed length char[] buffers for the zpool and compressor params. This saves memory and simplifies the param setting function. Dan Streetman (2): module: export param_free_charp() zswap: use charp for zswap param

[PATCH 2/2] zswap: use charp for zswap param strings

2015-08-26 Thread Dan Streetman
Instead of using a fixed-length string for the zswap params, use charp. This simplifies the code and uses less memory, as most zswap param strings will be less than the current maximum length. Signed-off-by: Dan Streetman ddstr...@ieee.org --- mm/zswap.c | 80

[PATCH 1/2] module: export param_free_charp()

2015-08-26 Thread Dan Streetman
Change the param_free_charp() function from static to exported. It is used by zswap in the next patch. Signed-off-by: Dan Streetman ddstr...@ieee.org --- include/linux/moduleparam.h | 1 + kernel/params.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include

[PATCHv2] zswap: update docs for runtime-changeable attributes

2015-08-24 Thread Dan Streetman
Change the Documentation/vm/zswap.txt doc to indicate that the "zpool" and "compressor" params are now changeable at runtime. Cc: Vlastimil Babka Signed-off-by: Dan Streetman --- changes since v1: update doc on working of zbud per Vlastimil Babka's suggestion add ex

[PATCHv2] zswap: update docs for runtime-changeable attributes

2015-08-24 Thread Dan Streetman
Change the Documentation/vm/zswap.txt doc to indicate that the zpool and compressor params are now changeable at runtime. Cc: Vlastimil Babka vba...@suse.cz Signed-off-by: Dan Streetman ddstr...@ieee.org --- changes since v1: update doc on working of zbud per Vlastimil Babka's suggestion add

Re: [PATCH] zswap: update docs for runtime-changeable attributes

2015-08-19 Thread Dan Streetman
On Wed, Aug 19, 2015 at 11:02 AM, Vlastimil Babka wrote: > On 08/19/2015 04:21 PM, Dan Streetman wrote: >> On Wed, Aug 19, 2015 at 10:02 AM, Vlastimil Babka wrote: >>> On 08/18/2015 09:07 PM, Dan Streetman wrote: >>>> +pages are freed. The pool is not prea

Re: [PATCH] zswap: update docs for runtime-changeable attributes

2015-08-19 Thread Dan Streetman
On Wed, Aug 19, 2015 at 10:02 AM, Vlastimil Babka wrote: > On 08/18/2015 09:07 PM, Dan Streetman wrote: >> Change the Documentation/vm/zswap.txt doc to indicate that the "zpool" >> and "compressor" params are now changeable at runtime. >> >> Signed-

Re: [PATCH] zswap: update docs for runtime-changeable attributes

2015-08-19 Thread Dan Streetman
On Wed, Aug 19, 2015 at 11:02 AM, Vlastimil Babka vba...@suse.cz wrote: On 08/19/2015 04:21 PM, Dan Streetman wrote: On Wed, Aug 19, 2015 at 10:02 AM, Vlastimil Babka vba...@suse.cz wrote: On 08/18/2015 09:07 PM, Dan Streetman wrote: +pages are freed. The pool is not preallocated. By default

Re: [PATCH] zswap: update docs for runtime-changeable attributes

2015-08-19 Thread Dan Streetman
On Wed, Aug 19, 2015 at 10:02 AM, Vlastimil Babka vba...@suse.cz wrote: On 08/18/2015 09:07 PM, Dan Streetman wrote: Change the Documentation/vm/zswap.txt doc to indicate that the zpool and compressor params are now changeable at runtime. Signed-off-by: Dan Streetman ddstr...@ieee.org

Re: [PATCH 1/2] zpool: define and use max type length

2015-08-18 Thread Dan Streetman
On Tue, Aug 18, 2015 at 6:38 PM, Andrew Morton wrote: > On Tue, 18 Aug 2015 16:06:00 -0400 Dan Streetman wrote: > >> Add ZPOOL_MAX_TYPE_NAME define, and change zpool_driver *type field to >> type[ZPOOL_MAX_TYPE_NAME]. Remove redundant type field from struct zpool >> and

[PATCH 1/2] zpool: define and use max type length

2015-08-18 Thread Dan Streetman
Add ZPOOL_MAX_TYPE_NAME define, and change zpool_driver *type field to type[ZPOOL_MAX_TYPE_NAME]. Remove redundant type field from struct zpool and use zpool->driver->type instead. The define will be used by zswap for its zpool param type name length. Signed-off-by: Dan Streetman --- i

[PATCH 2/2] zswap: use const max length for kparam names

2015-08-18 Thread Dan Streetman
o 32 or 64), but this patch simplifies and clarifies things by creating a single define to use for the kparam maxlen and the size of the stack char[]. Reported-by: kbuild test robot Signed-off-by: Dan Streetman --- mm/zswap.c | 24 ++-- 1 file changed, 14 insertions(+), 10 dele

[PATCH] zpool: remove no-op module init/exit

2015-08-18 Thread Dan Streetman
Remove zpool_init() and zpool_exit(); they do nothing other than print "loaded" and "unloaded". Signed-off-by: Dan Streetman --- mm/zpool.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/mm/zpool.c b/mm/zpool.c index d8cf7cd..8f670d3 100644 --- a/mm/zpoo

[PATCH] zswap: move zswap_pool frequently-used fields together

2015-08-18 Thread Dan Streetman
swap_frontswap_load 417 414 -3 > zswap_pool_create438 432 -6 > __zswap_cpu_comp_notifier.part 152 146 -6 > __zswap_cpu_comp_notifier122 116 -6 Suggested-by: Serge

[PATCH] zswap: update docs for runtime-changeable attributes

2015-08-18 Thread Dan Streetman
Change the Documentation/vm/zswap.txt doc to indicate that the "zpool" and "compressor" params are now changeable at runtime. Signed-off-by: Dan Streetman --- Documentation/vm/zswap.txt | 31 +++ 1 file changed, 23 insertions(+), 8 dele

[PATCH] zswap: update docs for runtime-changeable attributes

2015-08-18 Thread Dan Streetman
Change the Documentation/vm/zswap.txt doc to indicate that the zpool and compressor params are now changeable at runtime. Signed-off-by: Dan Streetman ddstr...@ieee.org --- Documentation/vm/zswap.txt | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff

[PATCH] zswap: move zswap_pool frequently-used fields together

2015-08-18 Thread Dan Streetman
152 146 -6 __zswap_cpu_comp_notifier122 116 -6 Suggested-by: Sergey Senozhatsky sergey.senozhatsky.w...@gmail.com Signed-off-by: Dan Streetman ddstr...@ieee.org --- mm/zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] zpool: remove no-op module init/exit

2015-08-18 Thread Dan Streetman
Remove zpool_init() and zpool_exit(); they do nothing other than print loaded and unloaded. Signed-off-by: Dan Streetman ddstr...@ieee.org --- mm/zpool.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/mm/zpool.c b/mm/zpool.c index d8cf7cd..8f670d3 100644 --- a/mm/zpool.c

Re: [PATCH 1/2] zpool: define and use max type length

2015-08-18 Thread Dan Streetman
On Tue, Aug 18, 2015 at 6:38 PM, Andrew Morton a...@linux-foundation.org wrote: On Tue, 18 Aug 2015 16:06:00 -0400 Dan Streetman ddstr...@ieee.org wrote: Add ZPOOL_MAX_TYPE_NAME define, and change zpool_driver *type field to type[ZPOOL_MAX_TYPE_NAME]. Remove redundant type field from struct

[PATCH 2/2] zswap: use const max length for kparam names

2015-08-18 Thread Dan Streetman
things by creating a single define to use for the kparam maxlen and the size of the stack char[]. Reported-by: kbuild test robot fengguang...@intel.com Signed-off-by: Dan Streetman ddstr...@ieee.org --- mm/zswap.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff

[PATCH 1/2] zpool: define and use max type length

2015-08-18 Thread Dan Streetman
Add ZPOOL_MAX_TYPE_NAME define, and change zpool_driver *type field to type[ZPOOL_MAX_TYPE_NAME]. Remove redundant type field from struct zpool and use zpool-driver-type instead. The define will be used by zswap for its zpool param type name length. Signed-off-by: Dan Streetman ddstr

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-14 Thread Dan Streetman
On Sun, Aug 9, 2015 at 8:49 PM, Sergey Senozhatsky wrote: > Hello, > > On (08/07/15 10:24), Dan Streetman wrote: >> > On (08/05/15 09:46), Dan Streetman wrote: >> > [..] >> >> -enum comp_op { >> >> - ZSWAP_COMPOP_COMPRESS, >>

Re: [PATCH 1/3] zpool: add zpool_has_pool()

2015-08-14 Thread Dan Streetman
>>On Wed, Aug 5, 2015 at 6:06 PM, Andrew Morton >>wrote: >>> On Wed, 5 Aug 2015 18:00:26 -0400 Dan Streetman wrote: >>> >>>> > >>>> > If there's some reason why this can't happen, can we please have a code >>>> > c

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-14 Thread Dan Streetman
On Sun, Aug 9, 2015 at 8:49 PM, Sergey Senozhatsky sergey.senozhatsky.w...@gmail.com wrote: Hello, On (08/07/15 10:24), Dan Streetman wrote: On (08/05/15 09:46), Dan Streetman wrote: [..] -enum comp_op { - ZSWAP_COMPOP_COMPRESS, - ZSWAP_COMPOP_DECOMPRESS +struct zswap_pool

Re: [PATCH 1/3] zpool: add zpool_has_pool()

2015-08-14 Thread Dan Streetman
On Wed, Aug 5, 2015 at 6:06 PM, Andrew Morton a...@linux-foundation.org wrote: On Wed, 5 Aug 2015 18:00:26 -0400 Dan Streetman ddstr...@ieee.org wrote: If there's some reason why this can't happen, can we please have a code comment which reveals that reason? zpool_create_pool() should

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-07 Thread Dan Streetman
On Fri, Aug 7, 2015 at 10:24 AM, Dan Streetman wrote: > On Fri, Aug 7, 2015 at 2:30 AM, Sergey Senozhatsky > wrote: >> Hello, >> >> On (08/05/15 09:46), Dan Streetman wrote: >> [..] >>> -enum comp_op { >>> - ZSWAP_COMPOP_COMPRESS, >>

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-07 Thread Dan Streetman
On Fri, Aug 7, 2015 at 2:30 AM, Sergey Senozhatsky wrote: > Hello, > > On (08/05/15 09:46), Dan Streetman wrote: > [..] >> -enum comp_op { >> - ZSWAP_COMPOP_COMPRESS, >> - ZSWAP_COMPOP_DECOMPRESS >> +struct zswap_pool { >> + stru

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-07 Thread Dan Streetman
On Fri, Aug 7, 2015 at 2:30 AM, Sergey Senozhatsky sergey.senozhatsky.w...@gmail.com wrote: Hello, On (08/05/15 09:46), Dan Streetman wrote: [..] -enum comp_op { - ZSWAP_COMPOP_COMPRESS, - ZSWAP_COMPOP_DECOMPRESS +struct zswap_pool { + struct zpool *zpool; + struct kref

Re: [PATCH 2/3] zswap: dynamic pool creation

2015-08-07 Thread Dan Streetman
On Fri, Aug 7, 2015 at 10:24 AM, Dan Streetman ddstr...@ieee.org wrote: On Fri, Aug 7, 2015 at 2:30 AM, Sergey Senozhatsky sergey.senozhatsky.w...@gmail.com wrote: Hello, On (08/05/15 09:46), Dan Streetman wrote: [..] -enum comp_op { - ZSWAP_COMPOP_COMPRESS

[PATCH] zswap: comment clarifying maxlen

2015-08-06 Thread Dan Streetman
Add a comment clarifying the variable-size array created on the stack will always be either CRYPTO_MAX_ALG_NAME (64) or 32 bytes long. Signed-off-by: Dan Streetman --- mm/zswap.c | 5 + 1 file changed, 5 insertions(+) diff --git a/mm/zswap.c b/mm/zswap.c index 7bbecd9..b198081 100644

<    1   2   3   4   5   6   7   8   9   10   >