rc = cfs_atomic_read(&cli->cl_lru_in_list) - pages_number;
if (rc > 0)
- (void)osc_lru_shrink(cli, rc);
+ (void)osc_lru_shrink(cli, rc, true);
return count;
}
return count;
}
+static int osc_rd_unstable_stats(char *page, char **start, off_t off,
+ int count, int *eof, void *data)
+{
+ struct obd_device *dev = data;
+ struct client_obd *cli = &dev->u.cli;
+ int pages, mb;
+
+ pages = cfs_atomic_read(&cli->cl_unstable_count);
+ mb = (pages * PAGE_CACHE_SIZE) >> 20;
+
+ return snprintf(page, count,
+ "unstable_pages: %8d\n"
+ "unstable_mb: %8d\n",
+ pages, mb);
+}
+
static struct lprocfs_vars lprocfs_osc_obd_vars[] = {
{ "uuid", lprocfs_rd_uuid, 0, 0 },
{ "ping", 0, lprocfs_wr_ping, 0, 0, 0222 },
{ "state", lprocfs_rd_state, 0, 0 },
{ "pinger_recov", lprocfs_rd_pinger_recov,
lprocfs_wr_pinger_recov, 0, 0 },
+ { "unstable_stats", osc_rd_unstable_stats, 0, 0},
+
{ 0 }
};