All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "dm-devel@redhat.com" <dm-devel@redhat.com>,
	"agk@redhat.com" <agk@redhat.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	"snitzer@redhat.com" <snitzer@redhat.com>
Cc: "hch@lst.de" <hch@lst.de>, "hare@suse.de" <hare@suse.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH v2 10/10] dm-zoned: Drive-managed zoned block device target
Date: Tue, 2 May 2017 21:53:41 +0000	[thread overview]
Message-ID: <1493762020.2552.15.camel@sandisk.com> (raw)
In-Reply-To: <20170501175314.10922-11-damien.lemoal@wdc.com>

On Tue, 2017-05-02 at 02:53 +0900, damien.lemoal@wdc.com wrote:
> +static unsigned long dmz_mblock_shrinker_count(struct shrinker *shrink,
> +                                              struct shrink_control *sc)
> +{
> +       struct dmz_target *dmz =
> +               container_of(shrink, struct dmz_target, mblk_shrinker);
> +
> +       return atomic_read(&dmz->nr_mblks);
> +}

Hello Damien,

dmz_mblock_shrinker_count() probably should return the following value since
dmz_shrink_mblock_cache() won't free more than the this number of elements:

        max(atomic_read(&dmz->nr_mblks) - dmz->min_nr_mblks, 0) 

But since v2 is IMHO good enough to be merged, for the whole series:

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>

WARNING: multiple messages have this Message-ID (diff)
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "dm-devel@redhat.com" <dm-devel@redhat.com>,
	"agk@redhat.com" <agk@redhat.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	"snitzer@redhat.com" <snitzer@redhat.com>
Cc: "hch@lst.de" <hch@lst.de>, "hare@suse.de" <hare@suse.de>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH v2 10/10] dm-zoned: Drive-managed zoned block device target
Date: Tue, 2 May 2017 21:53:41 +0000	[thread overview]
Message-ID: <1493762020.2552.15.camel@sandisk.com> (raw)
In-Reply-To: <20170501175314.10922-11-damien.lemoal@wdc.com>

On Tue, 2017-05-02 at 02:53 +0900, damien.lemoal@wdc.com wrote:
> +static unsigned long dmz_mblock_shrinker_count(struct shrinker *shrink,
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 struct shri=
nk_control *sc)
> +{
> +=A0=A0=A0=A0=A0=A0=A0struct dmz_target *dmz =3D
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0container_of(shrink, struct=
 dmz_target, mblk_shrinker);
> +
> +=A0=A0=A0=A0=A0=A0=A0return atomic_read(&dmz->nr_mblks);
> +}

Hello Damien,

dmz_mblock_shrinker_count() probably should return the following value sinc=
e
dmz_shrink_mblock_cache() won't free more than the this number of elements:

        max(atomic_read(&dmz->nr_mblks) - dmz->min_nr_mblks, 0)=20

But since v2 is IMHO good enough to be merged, for the whole series:

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>=

  parent reply	other threads:[~2017-05-02 21:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 17:53 [PATCH v2 00/10] dm: zoned block device support damien.lemoal
2017-05-01 17:53 ` [PATCH v2 01/10] dm-table: Introduce DM_TARGET_ZONED_HM feature damien.lemoal
2017-05-01 17:53 ` [PATCH v2 02/10] dm-table: Check device area zone alignment damien.lemoal
2017-05-01 17:53 ` [PATCH v2 03/10] dm-table: Check block devices zone model compatibility damien.lemoal
2017-05-01 17:53 ` [PATCH v2 04/10] dm: Fix REQ_OP_ZONE_RESET bio handling damien.lemoal
2017-05-01 17:53 ` [PATCH v2 05/10] dm: Fix REQ_OP_ZONE_REPORT " damien.lemoal
2017-05-01 17:53 ` [PATCH v2 06/10] dm: Introduce dm_remap_zone_report() damien.lemoal
2017-05-01 17:53 ` [PATCH v2 07/10] dm-flakey: Add support for zoned block devices damien.lemoal
2017-05-01 17:53 ` [PATCH v2 08/10] dm-linear: " damien.lemoal
2017-05-01 17:53 ` [PATCH v2 09/10] dm-kcopyd: Add sequential write feature damien.lemoal
     [not found] ` <20170501175314.10922-11-damien.lemoal@wdc.com>
2017-05-02 21:53   ` Bart Van Assche [this message]
2017-05-02 21:53     ` [PATCH v2 10/10] dm-zoned: Drive-managed zoned block device target Bart Van Assche

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=1493762020.2552.15.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=snitzer@redhat.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.