mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 05:36:22 +00:00
SCST_HIGHMEM removed as not needed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
+1
-9
@@ -245,13 +245,6 @@ in/out in Makefile:
|
||||
scsi_execute_async() function, you will get a warning message in the
|
||||
kernel log.
|
||||
|
||||
- CONFIG_SCST_HIGHMEM - if defined on HIGHMEM systems with 2.6 kernels, it
|
||||
allows SCST to use HIGHMEM. This is very experimental feature, which
|
||||
is currently broken and unsupported, since it is unclear, if it
|
||||
brings something valuable, except some performance hit. Note, that
|
||||
CONFIG_SCST_HIGHMEM isn't required for HIGHMEM systems and SCST will work
|
||||
fine on them with SCST_HIGHMEM off.
|
||||
|
||||
- CONFIG_SCST_STRICT_SECURITY - if defined, makes SCST zero allocated data
|
||||
buffers. Undefining it (default) considerably improves performance
|
||||
and eases CPU load, but could create a security hole (information
|
||||
@@ -650,8 +643,7 @@ II. In order to get the maximum performance you should:
|
||||
1. For SCST:
|
||||
|
||||
- Disable in Makefile CONFIG_SCST_STRICT_SERIALIZING, CONFIG_SCST_EXTRACHECKS,
|
||||
CONFIG_SCST_TRACING, DEBUG*, CONFIG_SCST_STRICT_SECURITY,
|
||||
CONFIG_SCST_HIGHMEM
|
||||
CONFIG_SCST_TRACING, DEBUG*, CONFIG_SCST_STRICT_SECURITY
|
||||
|
||||
- For pass-through devices enable
|
||||
CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ.
|
||||
|
||||
@@ -27,12 +27,6 @@ To be done
|
||||
|
||||
- Move linear searches to hash-table based.
|
||||
|
||||
- HIGHMEM cleanup. Looks like HIGHMEM usage doesn't worth the effort and
|
||||
performance hit, at least until VDISK handler doesn't use the page
|
||||
cache directly, so disable it for now, although the code looks ready.
|
||||
To enable it, set CONFIG_SCST_HIGHMEM in 1 in scst_priv.h. HIGHMEM is not
|
||||
supported on 2.4 and is not going to be.
|
||||
|
||||
- Small ToDo's spread all over the code.
|
||||
|
||||
- Investigate possible missed emulated UA cases.
|
||||
|
||||
+4
-40
@@ -27,9 +27,6 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/proc_fs.h>
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
#include <asm/kmap_types.h>
|
||||
#endif
|
||||
#include <scsi/scsi_cmnd.h>
|
||||
#include <scsi/scsi_device.h>
|
||||
#include <scsi/scsi_eh.h>
|
||||
@@ -2393,24 +2390,10 @@ static inline int __scst_get_buf(struct scst_cmd *cmd, uint8_t **buf)
|
||||
|
||||
if ((i >= cmd->sg_cnt) || unlikely(sg == NULL))
|
||||
goto out;
|
||||
#ifdef CONFIG_SCST_HIGHMEM /* HIGHMEM isn't currently supported */
|
||||
/*
|
||||
* HIGHMEM pages not merged (clustered), so if it's
|
||||
* not HIGHMEM page, kmap() is the same as page_address()
|
||||
*/
|
||||
if (scst_cmd_atomic(cmd)) {
|
||||
enum km_type km;
|
||||
if (in_softirq())
|
||||
km = KM_SOFTIRQ0;
|
||||
else
|
||||
km = KM_USER0;
|
||||
*buf = kmap_atomic(sg[i].page, km);
|
||||
} else
|
||||
*buf = kmap(sg[i].page);
|
||||
#else
|
||||
|
||||
*buf = page_address(sg_page(&sg[i]));
|
||||
#endif
|
||||
*buf += sg[i].offset;
|
||||
|
||||
res = sg[i].length;
|
||||
cmd->get_sg_buf_entry_num++;
|
||||
|
||||
@@ -2432,20 +2415,7 @@ static inline int scst_get_buf_next(struct scst_cmd *cmd, uint8_t **buf)
|
||||
|
||||
static inline void scst_put_buf(struct scst_cmd *cmd, void *buf)
|
||||
{
|
||||
#ifdef CONFIG_SCST_HIGHMEM /* HIGHMEM isn't currently supported */
|
||||
if (cmd->sg_cnt) {
|
||||
if (scst_cmd_atomic(cmd)) {
|
||||
enum km_type km;
|
||||
BUG_ON(in_irq());
|
||||
if (in_softirq())
|
||||
km = KM_SOFTIRQ0;
|
||||
else
|
||||
km = KM_USER0;
|
||||
kunmap_atomic(buf, km);
|
||||
} else
|
||||
kunmap(buf);
|
||||
}
|
||||
#endif
|
||||
/* Nothing to do */
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2454,13 +2424,7 @@ static inline void scst_put_buf(struct scst_cmd *cmd, void *buf)
|
||||
*/
|
||||
static inline int scst_get_buf_count(struct scst_cmd *cmd)
|
||||
{
|
||||
int res;
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
res = (cmd->bufflen >> PAGE_SHIFT) + 1;
|
||||
#else
|
||||
res = (cmd->sg_cnt == 0) ? 1 : cmd->sg_cnt;
|
||||
#endif
|
||||
return res;
|
||||
return (cmd->sg_cnt == 0) ? 1 : cmd->sg_cnt;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -139,11 +139,6 @@ EXTRA_CFLAGS += -DCONFIG_SCST_DEBUG -g
|
||||
# enable it if you have strict security requirements.
|
||||
#EXTRA_CFLAGS += -DSCST_STRICT_SECURITY
|
||||
|
||||
# If defined, allows SCST to use HIGHMEM. It's unclear, if it brings
|
||||
# something valuable, except performance hit in some cases,
|
||||
# so let it be off. Untested and unsupported.
|
||||
#EXTRA_CFLAGS += -DCONFIG_SCST_HIGHMEM
|
||||
|
||||
clean:
|
||||
rm -f *.o *.ko .*.cmd *.mod.c .*.d .depend Modules.symvers \
|
||||
Module.symvers Module.markers modules.order
|
||||
|
||||
@@ -28,10 +28,6 @@
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
#include <linux/highmem.h>
|
||||
#endif
|
||||
|
||||
#include "scst.h"
|
||||
#include "scst_priv.h"
|
||||
#include "scst_mem.h"
|
||||
@@ -516,10 +512,6 @@ static struct scst_tgt_dev *scst_alloc_add_tgt_dev(struct scst_session *sess,
|
||||
|
||||
if (sess->tgt->tgtt->unchecked_isa_dma || ini_unchecked_isa_dma) {
|
||||
scst_sgv_pool_use_dma(tgt_dev);
|
||||
} else {
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
scst_sgv_pool_use_highmem(tgt_dev);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dev->scsi_dev != NULL) {
|
||||
|
||||
@@ -40,13 +40,6 @@
|
||||
details."
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
#error "CONFIG_SCST_HIGHMEM configuration isn't supported and broken, because\
|
||||
there is no real point to support it, at least it definitely isn't \
|
||||
worth the effort. Better use no-HIGHMEM kernel with VMSPLIT option \
|
||||
or in 64-bit configuration instead. See README file for details."
|
||||
#endif
|
||||
|
||||
#if !defined(SCSI_EXEC_REQ_FIFO_DEFINED) && !defined(CONFIG_SCST_STRICT_SERIALIZING)
|
||||
#warning "Patch scst_exec_req_fifo-<kernel-version>.patch was not applied on \
|
||||
your kernel and CONFIG_SCST_STRICT_SERIALIZING isn't defined. Pass-through dev \
|
||||
@@ -1592,11 +1585,6 @@ static void __init scst_print_config(void)
|
||||
(j == i) ? "" : ", ");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
i += snprintf(&buf[i], sizeof(buf) - i, "%sSCST_HIGHMEM",
|
||||
(j == i) ? "" : ", ");
|
||||
#endif
|
||||
|
||||
if (j != i)
|
||||
PRINT_INFO("%s", buf);
|
||||
}
|
||||
|
||||
@@ -27,10 +27,6 @@
|
||||
#include <linux/unistd.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
#include <linux/highmem.h>
|
||||
#endif
|
||||
|
||||
#include "scst.h"
|
||||
#include "scst_priv.h"
|
||||
#include "scst_mem.h"
|
||||
@@ -61,15 +57,6 @@ void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev)
|
||||
tgt_dev->pool = &sgv_pools_mgr.default_set.dma;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
void scst_sgv_pool_use_highmem(struct scst_tgt_dev *tgt_dev)
|
||||
{
|
||||
TRACE_MEM("%s", "Use HIGHMEM");
|
||||
tgt_dev->gfp_mask = __GFP_NOWARN | __GFP_HIGHMEM;
|
||||
tgt_dev->pool = &sgv_pools_mgr.default_set.highmem;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int scst_check_clustering(struct scatterlist *sg, int cur, int hint)
|
||||
{
|
||||
int res = -1;
|
||||
@@ -80,13 +67,6 @@ static int scst_check_clustering(struct scatterlist *sg, int cur, int hint)
|
||||
int full_page_cur = (len_cur & (PAGE_SIZE - 1)) == 0;
|
||||
unsigned long pfn, pfn_next, full_page;
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
if (page >= highmem_start_page) {
|
||||
TRACE_MEM("%s", "HIGHMEM page allocated, no clustering")
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
TRACE_MEM("pfn_cur %ld, pfn_cur_next %ld, len_cur %d, full_page_cur %d",
|
||||
pfn_cur, pfn_cur_next, len_cur, full_page_cur);
|
||||
@@ -1228,12 +1208,6 @@ int scst_sgv_pools_init(unsigned long mem_hwmark, unsigned long mem_lwmark)
|
||||
if (res != 0)
|
||||
goto out_free_norm;
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
res = sgv_pool_init(&pools->default_set.highmem, "sgv-high", 0);
|
||||
if (res != 0)
|
||||
goto out_free_dma;
|
||||
#endif
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20))
|
||||
INIT_DELAYED_WORK(&pools->mgr.apit_pool,
|
||||
(void (*)(struct work_struct *))sgv_pool_cached_pitbool);
|
||||
@@ -1254,11 +1228,6 @@ out:
|
||||
TRACE_EXIT_RES(res);
|
||||
return res;
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
out_free_dma:
|
||||
sgv_pool_deinit(&pools->default_set.dma);
|
||||
#endif
|
||||
|
||||
out_free_norm:
|
||||
sgv_pool_deinit(&pools->default_set.norm);
|
||||
|
||||
@@ -1281,9 +1250,6 @@ void scst_sgv_pools_deinit(void)
|
||||
|
||||
cancel_delayed_work(&pools->mgr.apit_pool);
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
sgv_pool_deinit(&pools->default_set.highmem);
|
||||
#endif
|
||||
sgv_pool_deinit(&pools->default_set.dma);
|
||||
sgv_pool_deinit(&pools->default_set.norm);
|
||||
sgv_pool_deinit(&pools->default_set.norm_clust);
|
||||
|
||||
@@ -91,9 +91,6 @@ struct scst_sgv_pools_manager {
|
||||
struct {
|
||||
struct sgv_pool norm_clust, norm;
|
||||
struct sgv_pool dma;
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
struct sgv_pool highmem;
|
||||
#endif
|
||||
} default_set;
|
||||
|
||||
struct sgv_pool_mgr {
|
||||
@@ -148,6 +145,3 @@ extern int sgv_pool_procinfo_show(struct seq_file *seq, void *v);
|
||||
void scst_sgv_pool_use_norm(struct scst_tgt_dev *tgt_dev);
|
||||
void scst_sgv_pool_use_norm_clust(struct scst_tgt_dev *tgt_dev);
|
||||
void scst_sgv_pool_use_dma(struct scst_tgt_dev *tgt_dev);
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
void scst_sgv_pool_use_highmem(struct scst_tgt_dev *tgt_dev);
|
||||
#endif
|
||||
|
||||
@@ -1772,10 +1772,6 @@ static int scst_version_info_show(struct seq_file *seq, void *v)
|
||||
seq_printf(seq, "SCST_STRICT_SECURITY\n");
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCST_HIGHMEM
|
||||
seq_printf(seq, "SCST_HIGHMEM\n");
|
||||
#endif
|
||||
|
||||
TRACE_EXIT();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user