source: trunk/server/source3/modules/vfs_cacheprime.c@ 1075

Last change on this file since 1075 was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 6.5 KB
Line 
1/*
2 * Copyright (c) James Peach 2005-2006
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "includes.h"
19#include "smbd/smbd.h"
20
21/* Cache priming module.
22 *
23 * The purpose of this module is to do RAID stripe width reads to prime the
24 * buffer cache to do zero-copy I/O for subsequent sendfile calls. The idea is
25 * to do a single large read at the start of the file to make sure that most or
26 * all of the file is pulled into the buffer cache. Subsequent I/Os have
27 * reduced latency.
28 *
29 * Tunables.
30 *
31 * cacheprime:rsize Amount of readahead in bytes. This should be a
32 * multiple of the RAID stripe width.