reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Mathieu Belanger <m@thieu.so>
Cc: Christopher Gentile <cnjgentile@gmail.com>,
	Du?an ?oli? <dusanc@gmail.com>, Evgeniy <iron.udjin@gmail.com>,
	reiserfs-devel <reiserfs-devel@vger.kernel.org>
Subject: Re: Reiser4 GIT and Kernel 3.11 patchs
Date: Thu, 19 Sep 2013 22:05:03 +0200	[thread overview]
Message-ID: <523B58EF.5070906@gmail.com> (raw)
In-Reply-To: <20130919180949.Horde.nfafj_-4N9u8NKKzsKcYlw1@mail.thieu.so>

Cool, thanks!
I'll concentrate then on fixing problem with non-removable files..

Edward.


19.09.2013 20:09, Mathieu Belanger пишет:
>
> I have ported the code to the new shrinker API (kernel 3.12-rc1) and 
> removed the support for the old API a have added earlier.
>
> It compile but did not test yet.
>
> Here the diff to apply on the current Ivan patch (for Edward or other 
> who don't use git):
>
>
> @@ -31,9 +31,11 @@
>   * Shrinks d_cursor_cache. Scan LRU list of unused cursors, freeing 
> requested
>   * number. Return number of still freeable cursors.
>   */
> -static int d_cursor_shrink(struct shrinker *shrink, struct 
> shrink_control *sc)
> +static unsigned long d_cursor_shrink_scan(struct shrinker *shrink, 
> struct shrink_control *sc)
>  {
> -  if (sc->nr_to_scan != 0) {
> +  unsigned long freed = 0;
> +  unsigned long remain = sc->nr_to_scan;
> +  if (remain != 0) {
>      dir_cursor *scan;
>
>      spin_lock(&d_c_lock);
> @@ -41,12 +43,18 @@ static int d_cursor_shrink(struct shrinker 
> *shrink, struct shrink_control *sc)
>        scan = list_entry(cursor_cache.next, dir_cursor, alist);
>        assert("nikita-3567", scan->ref == 0);
>        kill_cursor(scan);
> -      --sc->nr_to_scan;
> -      if (sc->nr_to_scan == 0)
> +      --remain;
> +      freed++;
> +      if (remain == 0)
>          break;
>      }
>      spin_unlock(&d_c_lock);
>    }
> +  return freed;
> +}
> +
> +static unsigned long d_cursor_shrink_count (struct shrinker *shrink, 
> struct shrink_control *sc)
> +{
>    return d_cursor_unused;
>  }
>
> @@ -58,7 +66,8 @@ static int d_cursor_shrink(struct shrinker *shrink, 
> struct shrink_control *sc)
>   * shrunk only if system is really tight on memory.
>   */
>  static struct shrinker d_cursor_shrinker = {
> -  .shrink = d_cursor_shrink,
> +  .count_objects = d_cursor_shrink_count,
> +  .scan_objects = d_cursor_shrink_scan,
>    .seeks = DEFAULT_SEEKS << 3,
>  };
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe 
> reiserfs-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe reiserfs-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2013-09-19 20:05 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 15:14 Reiser4 GIT and Kernel 3.11 patchs m
2013-09-19 15:55 ` Mathieu Belanger
2013-09-19 16:08   ` Christopher Gentile
2013-09-19 16:21   ` Christopher Gentile
2013-09-19 18:09     ` Mathieu Belanger
2013-09-19 20:05       ` Edward Shishkin [this message]
2013-09-19 18:16   ` Christopher Gentile
2013-09-23 19:01 ` Edward Shishkin
2013-09-23 21:21   ` Edward Shishkin
2013-09-24  9:08   ` Chris Gentile
2013-09-25  0:31     ` Mathieu Belanger
2013-09-25  0:34       ` Chris Gentile
2013-09-28 16:06         ` Chris Gentile
2013-09-25  4:47       ` Chris Gentile
  -- strict thread matches above, loose matches on Subject: below --
2013-09-28 16:20 m
2013-09-28 17:43 ` Chris Gentile
     [not found]   ` <20130928174954.Horde.5eBFCXLtsWAtF9zNtt95nQ1@mail.thieu.so>
2013-09-28 18:22     ` Chris Gentile
2013-09-17 18:15 Mathieu Belanger
2013-09-17 19:52 ` Edward Shishkin
2013-09-17 20:24   ` Evgeniy
2013-09-17 20:37     ` Chris Gentile
2013-09-17 21:02       ` Evgeniy
2013-09-17 21:15         ` Mathieu Belanger
2013-09-17 21:22           ` Chris Gentile
2013-09-17 22:02           ` Chris Gentile
2013-09-18  3:44             ` Mathieu Belanger
2013-09-18  5:52               ` Chris Gentile
2013-09-18  6:14               ` Chris Gentile
2013-09-18  6:20                 ` Mathieu Belanger
2013-09-18  6:47                   ` Chris Gentile
2013-09-18  6:54                     ` Mathieu Belanger
2013-09-18  6:59                       ` Chris Gentile
2013-09-18 13:20                         ` Evgeniy
2013-09-18 13:27                           ` Chris Gentile
2013-09-18 13:30                           ` Chris Gentile
2013-09-18 14:02                             ` Evgeniy
2013-09-18 15:53                               ` Evgeniy
2013-09-18 16:09                                 ` Mathieu Belanger
2013-09-18 16:20                                   ` Mathieu Belanger
2013-09-18 16:24                                   ` Evgeniy
2013-09-18 16:39                                     ` Mathieu Belanger
2013-09-18 18:02                                       ` Evgeniy
2013-09-18 18:20                                         ` Mathieu Belanger
2013-09-18 18:36                                           ` Mathieu Belanger
2013-09-18 23:24                                         ` Mathieu Belanger
2013-09-18 23:36                                           ` Edward Shishkin
2013-09-19  1:25                                           ` Mathieu Belanger
     [not found]                                             ` <CADW=+3=znbq=KDqCmzQ_eq=V_9i4VpHj_uOcB3joJbZUZPNtdA@mail.gmail.com>
2013-09-19  5:45                                               ` Mathieu Belanger
2013-09-19  9:12                                                 ` Edward Shishkin
2013-09-19 10:10                                                   ` Evgeniy
2013-09-19 10:23                                                     ` Evgeniy
2013-09-19 10:24                                                     ` Edward Shishkin
2013-09-19 15:02                                                   ` Christopher Gentile
2013-09-19 14:43                                           ` Christopher Gentile
     [not found]         ` <5238C666.6080703@gmail.com>
2013-09-17 21:22           ` Evgeniy
2013-09-17 21:25             ` Chris Gentile
2013-09-17 21:35               ` Evgeniy
     [not found]   ` <CAL2jS+mhmvmse7UqK4Xa0pYLSBJ9mfBDohKYFKdjzpAbL-=prA@mail.gmail.com>
2013-09-17 23:13     ` Edward Shishkin

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=523B58EF.5070906@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=cnjgentile@gmail.com \
    --cc=dusanc@gmail.com \
    --cc=iron.udjin@gmail.com \
    --cc=m@thieu.so \
    --cc=reiserfs-devel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).