コード例 #1
0
ファイル: fld_cache.c プロジェクト: Xyratex/lustre-stable
/**
 * destroy fld cache.
 */
void fld_cache_fini(struct fld_cache *cache)
{
	LASSERT(cache != NULL);
	fld_cache_flush(cache);

	CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
	CDEBUG(D_INFO, "  Cache reqs: %llu\n", cache->fci_stat.fst_cache);
	CDEBUG(D_INFO, "  Total reqs: %llu\n", cache->fci_stat.fst_count);

	OBD_FREE_PTR(cache);
}
コード例 #2
0
ファイル: lproc_fld.c プロジェクト: 7799/linux
static ssize_t
fld_proc_cache_flush_write(struct file *file, const char __user *buffer,
			       size_t count, loff_t *pos)
{
	struct lu_client_fld *fld = file->private_data;

	LASSERT(fld != NULL);

	fld_cache_flush(fld->lcf_cache);

	CDEBUG(D_INFO, "%s: Lookup cache is flushed\n", fld->lcf_name);

	return count;
}
コード例 #3
0
ファイル: fld_cache.c プロジェクト: Announcement/linux
/**
 * destroy fld cache.
 */
void fld_cache_fini(struct fld_cache *cache)
{
	__u64 pct;

	LASSERT(cache);
	fld_cache_flush(cache);

	if (cache->fci_stat.fst_count > 0) {
		pct = cache->fci_stat.fst_cache * 100;
		do_div(pct, cache->fci_stat.fst_count);
	} else {
		pct = 0;
	}

	CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
	CDEBUG(D_INFO, "  Total reqs: %llu\n", cache->fci_stat.fst_count);
	CDEBUG(D_INFO, "  Cache reqs: %llu\n", cache->fci_stat.fst_cache);
	CDEBUG(D_INFO, "  Cache hits: %llu%%\n", pct);

	kfree(cache);
}
コード例 #4
0
ファイル: fld_cache.c プロジェクト: Lezval/lustre
/**
 * destroy fld cache.
 */
void fld_cache_fini(struct fld_cache *cache)
{
        __u64 pct;
        ENTRY;

        LASSERT(cache != NULL);
        fld_cache_flush(cache);

        if (cache->fci_stat.fst_count > 0) {
                pct = cache->fci_stat.fst_cache * 100;
                do_div(pct, cache->fci_stat.fst_count);
        } else {
                pct = 0;
        }

        CDEBUG(D_INFO, "FLD cache statistics (%s):\n", cache->fci_name);
        CDEBUG(D_INFO, "  Total reqs: "LPU64"\n", cache->fci_stat.fst_count);
        CDEBUG(D_INFO, "  Cache reqs: "LPU64"\n", cache->fci_stat.fst_cache);
        CDEBUG(D_INFO, "  Cache hits: "LPU64"%%\n", pct);

        OBD_FREE_PTR(cache);

        EXIT;
}