All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] zram: user per-cpu compression streams
Date: Tue, 3 May 2016 16:01:08 +0900	[thread overview]
Message-ID: <20160503070108.GE25545@swordfish> (raw)
In-Reply-To: <20160503061823.GA6062@blaptop>

On (05/03/16 15:19), Minchan Kim wrote:
> > > > cat /sys/xxx/max_comp_stream returns num_online_cpus.
> > > 
> > > One more thing,
> > > 
> > > User:
> > > echo 4 > /sys/xxx/max_comp_stream"
> > > cat /sys/xxx/max_comp_streams
> > > 8
> > 
> > sure, it can also be
> > 
> > cat /sys/xxx/max_comp_streams
> > 5
> > cat /sys/xxx/max_comp_streams
> > 6
> > cat /sys/xxx/max_comp_streams
> > 7
> > cat /sys/xxx/max_comp_streams
> > 3
> > 
> > depending on the availability of CPUs. but why would user space
> > constantly check max_comp_streams?
> > 
> > > which is rather weird?
> > > 
> > > We should keep user's value and return it to user although it's techically
> > > lying. IMO, it would be best way to prevent confusing for user until we
> > > removes max_comp_streams finally.
> > 
> > well, I preferred to show the actual state of the device. besides,
> > does anyone really do
> > 
> > 	write buffer to file
> > 	if (success)
> > 		read from file and compare with the buffer
> > 
> > ?
> > 
> 
> Okay, I want to go with your approach!

thanks. I mean that was my thinking when I decided to change the
max_comp_streams output. but no pressure, it does change the numbers
that user space will see. don't have any strong opinion, can keep it
as zcomp cleanup only -- w/o touching the _show()/_store() parts.

> Could you update zram.txt to reflect it?

will do later today. I think I'd prefer to keep it as independent
patch, since it does change the user visible behaviour after all (no
idea if it's true tho; can't easily think why would anyone keep track
of the values returned by cat /sys/xxx/max_comp_streams), so we can
revert it w/o reverting the per-cpu streams IF anyone/anything will
get upset with the change.

	-ss

  reply	other threads:[~2016-05-03  6:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-28 16:17 [PATCH 0/2] zram: switch to per-cpu compression streams Sergey Senozhatsky
2016-04-28 16:17 ` [PATCH 1/2] zsmalloc: require GFP in zs_malloc() Sergey Senozhatsky
2016-04-29  5:44   ` Minchan Kim
2016-04-29  7:30     ` Sergey Senozhatsky
2016-04-28 16:17 ` [PATCH 2/2] zram: user per-cpu compression streams Sergey Senozhatsky
2016-05-02  6:23   ` Minchan Kim
2016-05-02  7:25     ` Sergey Senozhatsky
2016-05-02  8:06       ` Sergey Senozhatsky
2016-05-03  5:23         ` Minchan Kim
2016-05-03  5:40           ` Minchan Kim
2016-05-03  5:57             ` Sergey Senozhatsky
2016-05-03  6:19               ` Minchan Kim
2016-05-03  7:01                 ` Sergey Senozhatsky [this message]
2016-05-03  5:44           ` Sergey Senozhatsky
2016-05-02  8:28       ` Minchan Kim
2016-05-02  9:21         ` Sergey Senozhatsky
2016-05-03  1:40           ` Minchan Kim
2016-05-03  1:53             ` Sergey Senozhatsky
2016-05-03  2:20               ` Minchan Kim
2016-05-03  2:30                 ` Sergey Senozhatsky
2016-05-03  4:29                   ` Sergey Senozhatsky
2016-05-03  5:03                     ` Minchan Kim
2016-05-03  6:53                       ` Sergey Senozhatsky

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=20160503070108.GE25545@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky@gmail.com \
    /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.